Only activate menu items if the mouse releases in them - fixes #4863

Ticket URL <http://bugs.sugarlabs.org/ticket/4863>
This commit is contained in:
Sam Parkinson 2015-07-24 21:32:05 +10:00
parent 7a3d23e2b6
commit 9fc5b49329

View File

@ -159,7 +159,9 @@ class PaletteMenuItem(Gtk.EventBox):
self.show_all() self.show_all()
def __button_release_cb(self, widget, event): def __button_release_cb(self, widget, event):
self.emit('activate') alloc = self.get_allocation()
if 0 < event.x < alloc.width and 0 < event.y < alloc.height:
self.emit('activate')
def __enter_notify_cb(self, widget, event): def __enter_notify_cb(self, widget, event):
self.modify_bg(Gtk.StateType.NORMAL, self.modify_bg(Gtk.StateType.NORMAL,