diff options
author | Simon Schampijer <simon@laptop.org> | 2012-10-25 09:11:30 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-10-25 13:54:46 (GMT) |
commit | 590785f7d1f1f2a264da1327580c580b7a77f44a (patch) | |
tree | 30fb259860bf617b3fc495c08d5a4d14ec56ab8f | |
parent | 080f25e73b082c9750ad647be9cf73a1e2001794 (diff) |
EventIcon: make sure we are able to dismiss the Palette
Without this patch when tapping on an EventIcon
we do get a GDK_CROSSING_UNGRAB leave event when
the Palette is raised. Because of this the Invoker
does not know how to popdown the Palette when
you tap outside or when clicking on actions in the
Palette itself.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r-- | src/sugar3/graphics/icon.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 5863118..2d66cf9 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -491,6 +491,9 @@ class EventIcon(Gtk.EventBox): Gtk.EventBox.__init__(self) self.set_visible_window(False) self.set_above_child(True) + self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | + Gdk.EventMask.TOUCH_MASK | + Gdk.EventMask.BUTTON_RELEASE_MASK) for key, value in kwargs.iteritems(): self.set_property(key, value) |