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>
This commit is contained in:
parent
dd5a68e8ce
commit
de7c5b90bd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user