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

Manuel Quiñones manuq at laptop.org
Thu Jun 21 08:02:48 EDT 2012


2012/6/21 Simon Schampijer <simon at schampijer.de>:
> 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

Right, all events inside the event box should go to the event box.

> Signed-off-by: Simon Schampijer <simon at laptop.org>
Reviewed-by: Manuel Quiñones <manuq 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
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..


More information about the Sugar-devel mailing list