diff options
author | Simon Schampijer <simon@laptop.org> | 2012-11-01 12:24:45 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-11-05 13:40:31 (GMT) |
commit | de7c5b90bde3b937f086d9a350bb5e1990cb5dcc (patch) | |
tree | 1edb03edce6d134a37c7d5fea87f89d11e284a7e | |
parent | dd5a68e8ceef002dcda50c59e61e3411ebddcf4e (diff) |
TrayIcon: set the touch mask on the event box, part of SL #4127
We do need to add the mask if we want to receive
the 'touch-event' signal. The Gtk.EventBox does
set the touch event mask by default.
[1] http://developer.gnome.org/gtk3/3.4/GtkWidget.html#GtkWidget-touch-event
[2] http://git.gnome.org/browse/gtk+/tree/gtk/gtkeventbox.c#n411
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r-- | src/sugar3/graphics/tray.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py index 82e1d97..0b3ca9a 100644 --- a/src/sugar3/graphics/tray.py +++ b/src/sugar3/graphics/tray.py @@ -21,6 +21,7 @@ STABLE. from gi.repository import GObject from gi.repository import Gtk +from gi.repository import Gdk from sugar3.graphics import style from sugar3.graphics.palette import ToolInvoker @@ -409,6 +410,9 @@ class _IconWidget(Gtk.EventBox): GObject.GObject.__init__(self) self.set_app_paintable(True) + self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | + Gdk.EventMask.TOUCH_MASK | + Gdk.EventMask.BUTTON_RELEASE_MASK) self._icon = Icon(icon_name=icon_name, xo_color=xo_color, icon_size=Gtk.IconSize.LARGE_TOOLBAR) |