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
This commit is contained in:
parent
2956eb2060
commit
285376b049
@ -949,7 +949,8 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
mTree.show_all()
|
mTree.show_all()
|
||||||
gtk.gtk_menu_popup(hash(mTree), None, None, None, None, ev.button, ev.time)
|
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:
|
else:
|
||||||
mTree = Gtk.Menu()
|
mTree = Gtk.Menu()
|
||||||
@ -969,7 +970,8 @@ class pluginclass( object ):
|
|||||||
insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore )
|
insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore )
|
||||||
insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore )
|
insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore )
|
||||||
gtk.gtk_menu_popup(hash(mTree), None, None, None, None, ev.button, ev.time)
|
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 ):
|
def menuPopup( self, widget, event ):
|
||||||
if event.button == 3:
|
if event.button == 3:
|
||||||
|
Loading…
Reference in New Issue
Block a user