Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: ui/views/controls/menu/menu_host.cc

Issue 378333003: Allow menus to stay open during a child view's drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/widget/widget.h » ('j') | ui/views/widget/widget.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_host.cc
diff --git a/ui/views/controls/menu/menu_host.cc b/ui/views/controls/menu/menu_host.cc
index 2716ec8bb782c1a46288c0ab449d80a2a96e2caf..f7a004849c5217376dc46112a9728b61aa11c979 100644
--- a/ui/views/controls/menu/menu_host.cc
+++ b/ui/views/controls/menu/menu_host.cc
@@ -110,8 +110,11 @@ void MenuHost::OnMouseCaptureLost() {
return;
MenuController* menu_controller =
submenu_->GetMenuItem()->GetMenuController();
- if (menu_controller && !menu_controller->drag_in_progress())
+ if (menu_controller &&
+ !menu_controller->drag_in_progress() &&
+ !child_drag_in_progress()) {
menu_controller->CancelAll();
+ }
Widget::OnMouseCaptureLost();
}
« no previous file with comments | « no previous file | ui/views/widget/widget.h » ('j') | ui/views/widget/widget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698