From 7cf368d8e41dce78f5ab8920f3f048c97b96876c Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Wed, 26 Aug 2009 19:42:11 +0000 Subject: Gets bookmark menu working on linux. There are just a handful of NOTIMPLEMENTEDs to resolve (initiating drags is the biggest remaining issue). I'll tackle the remaining issues separately. BUG=none TEST=make sure bookmark menus work well on windows still. Review URL: http://codereview.chromium.org/173431 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24501 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/menu/menu_host_gtk.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'views/controls/menu/menu_host_gtk.h') 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); }; -- cgit v1.1