[Sugar-devel] [PATCH] Make the child window of the event box insisible
Manuel Quiñones
manuq at laptop.org
Thu Jun 21 07:59:08 EDT 2012
2012/6/21 Simon Schampijer <simon at schampijer.de>:
> We do use the EventBox only to receive events, hence the
> window that the even box creates should be a GDK_INPUT_ONLY
> window, which means that it is invisible and only serves to
> receive events [1].
And that's exactly what we need.
> A test program to see this is at [2].
>
> [1] http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-visible-window
> [2] dev.laptop.org/~erikos/shell_port/invisible_window.py
The test program was very helpful, running it from terminal activity
(was giving warnings like "No icon with the name computer-xo was found
in the theme").
>
> Signed-off-by: Simon Schampijer <simon at laptop.org>
Reviewed-by: Manuel Quiñones <manuq at laptop.org>
> ---
> src/sugar3/graphics/icon.py | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
> index 970446a..d99af7d 100644
> --- a/src/sugar3/graphics/icon.py
> +++ b/src/sugar3/graphics/icon.py
> @@ -561,6 +561,8 @@ class EventIcon(Gtk.EventBox):
> def __init__(self, **kwargs):
> Gtk.EventBox.__init__(self)
>
> + self.set_visible_window(False)
> +
> self._icon = Icon()
> for key, value in kwargs.iteritems():
> self._icon.set_property(key, value)
> --
> 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