From 285376b04963962925b2166d926fec4e980aaa12 Mon Sep 17 00:00:00 2001 From: Karthik T Date: Thu, 24 Oct 2013 00:51:19 +0800 Subject: [PATCH] Fix mouse focus bug with favorites menu If you click on favorites and click on any area outside menu -> nothing happens This is because the mouse is grabed by window. Fix this by registering a callback instead of immediately grabbing(not sure why this was added by Michael) Frankly this code can use some DRY love --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 4628fd7..ae5db47 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -949,7 +949,8 @@ class pluginclass( object ): mTree.show_all() gtk.gtk_menu_popup(hash(mTree), None, None, None, None, ev.button, ev.time) - self.mintMenuWin.grab() + #self.mintMenuWin.grab() + mTree.connect( 'deactivate', self.onMenuPopupDeactivate) else: mTree = Gtk.Menu() @@ -969,7 +970,8 @@ class pluginclass( object ): insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore ) insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore ) gtk.gtk_menu_popup(hash(mTree), None, None, None, None, ev.button, ev.time) - self.mintMenuWin.grab() + #self.mintMenuWin.grab() + mTree.connect( 'deactivate', self.onMenuPopupDeactivate) def menuPopup( self, widget, event ): if event.button == 3: