diff options
Diffstat (limited to 'views/controls/menu/menu_host_gtk.h')
-rw-r--r-- | views/controls/menu/menu_host_gtk.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/views/controls/menu/menu_host_gtk.h b/views/controls/menu/menu_host_gtk.h index 545acb5..6e70bc9 100644 --- a/views/controls/menu/menu_host_gtk.h +++ b/views/controls/menu/menu_host_gtk.h @@ -30,12 +30,17 @@ class MenuHost : public WidgetGtk { protected: virtual RootView* CreateRootView(); - virtual void OnCancelMode(); + // If the grab breaks we cancel the menu. + virtual gboolean OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event); + virtual void OnGrabNotify(GtkWidget* widget, gboolean was_grabbed); // Overriden to return false, we do NOT want to release capture on mouse // release. virtual bool ReleaseCaptureOnMouseReleased(); + // Overriden to also release pointer grab. + virtual void ReleaseGrab(); + private: // If true, we've been closed. bool closed_; @@ -43,6 +48,9 @@ class MenuHost : public WidgetGtk { // The view we contain. SubmenuView* submenu_; + // Have we done a pointer grab? + bool did_pointer_grab_; + DISALLOW_COPY_AND_ASSIGN(MenuHost); }; |