[Sugar-devel] [PATCH] EventIcon: all the events go directly to the event box

Simon Schampijer simon at schampijer.de
Thu Jun 21 04:21:26 EDT 2012


Position the event box window above the windows of its child, that way
all events inside the event box will go to the event box. If the window is
below, events in windows of child widgets will first got to that widget,
and then to its parents [1].

[1] http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-above-child

Signed-off-by: Simon Schampijer <simon at laptop.org>
---
 src/sugar3/graphics/icon.py |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index d99af7d..175d235 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -562,6 +562,7 @@ class EventIcon(Gtk.EventBox):
         Gtk.EventBox.__init__(self)
 
         self.set_visible_window(False)
+        self.set_above_child(True)
 
         self._icon = Icon()
         for key, value in kwargs.iteritems():
-- 
1.7.10.4



More information about the Sugar-devel mailing list