summaryrefslogtreecommitdiffstats
path: root/views/controls/menu/menu_host_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/menu/menu_host_gtk.cc')
-rw-r--r--views/controls/menu/menu_host_gtk.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/views/controls/menu/menu_host_gtk.cc b/views/controls/menu/menu_host_gtk.cc
index 9990aab..f79f3363b 100644
--- a/views/controls/menu/menu_host_gtk.cc
+++ b/views/controls/menu/menu_host_gtk.cc
@@ -101,17 +101,12 @@ RootView* MenuHost::CreateRootView() {
}
gboolean MenuHost::OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event) {
- if (!closed_)
- submenu_->GetMenuItem()->GetMenuController()->Cancel(true);
+ // Grab breaking only happens when drag and drop starts. So, we don't try
+ // and ungrab or cancel the menu.
+ did_pointer_grab_ = false;
return WidgetGtk::OnGrabBrokeEvent(widget, event);
}
-void MenuHost::OnGrabNotify(GtkWidget* widget, gboolean was_grabbed) {
- if (!closed_ && (widget != window_contents() || !was_grabbed))
- submenu_->GetMenuItem()->GetMenuController()->Cancel(true);
- WidgetGtk::OnGrabNotify(widget, was_grabbed);
-}
-
// Overriden to return false, we do NOT want to release capture on mouse
// release.
bool MenuHost::ReleaseCaptureOnMouseReleased() {