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..90192405a667c0d7ab15544ca57d70b584120aea 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() && |
+ !dragged_view()) { |
sky
2014/07/11 17:45:33
Document why we check dragged_view(). I also midly
Devlin
2014/07/11 18:43:51
If we forward a OnDragWillStart() down to MenuCont
sky
2014/07/11 19:15:20
Yes, I believe you are right.
|
menu_controller->CancelAll(); |
+ } |
Widget::OnMouseCaptureLost(); |
} |
@@ -135,4 +138,10 @@ void MenuHost::OnOwnerClosing() { |
menu_controller->CancelAll(); |
} |
+void MenuHost::OnDragComplete() { |
+ // During a view's drag, we may have lost the capture. Reset it so that we |
sky
2014/07/11 17:45:33
Add a delegate method as to what should happen whe
Devlin
2014/07/11 18:43:51
Done. However, this has a side-effect: other drag
sky
2014/07/11 19:15:20
Good point. I don't believe the bookmark code does
Devlin
2014/07/11 20:28:15
Tentatively done (see comment on new patch set).
|
+ // get OnMouseCaptureLost events. |
+ native_widget_private()->SetCapture(); |
+} |
+ |
} // namespace views |