From 590785f7d1f1f2a264da1327580c580b7a77f44a Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 25 Oct 2012 09:11:30 +0000 Subject: [PATCH] EventIcon: make sure we are able to dismiss the Palette MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Manuel QuiƱones --- src/sugar3/graphics/icon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 5863118e..2d66cf91 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)