From 3794306ef326df4d23463b69929d50d22217b309 Mon Sep 17 00:00:00 2001
From: Simon Schampijer <simon@laptop.org>
Date: Thu, 1 Nov 2012 13:24:45 +0100
Subject: [PATCH toolkit-gtk3 1/2] TrayIcon: set the touch mask on the event
box
This is done in order to be able to receive touch
events, on Gtk.EventBoxes the mask is not set by
default.
---
src/sugar3/graphics/tray.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
index 82e1d97..0b3ca9a 100644
a
|
b
|
STABLE. |
21 | 21 | |
22 | 22 | from gi.repository import GObject |
23 | 23 | from gi.repository import Gtk |
| 24 | from gi.repository import Gdk |
24 | 25 | |
25 | 26 | from sugar3.graphics import style |
26 | 27 | from sugar3.graphics.palette import ToolInvoker |
… |
… |
class _IconWidget(Gtk.EventBox): |
409 | 410 | GObject.GObject.__init__(self) |
410 | 411 | |
411 | 412 | self.set_app_paintable(True) |
| 413 | self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | |
| 414 | Gdk.EventMask.TOUCH_MASK | |
| 415 | Gdk.EventMask.BUTTON_RELEASE_MASK) |
412 | 416 | |
413 | 417 | self._icon = Icon(icon_name=icon_name, xo_color=xo_color, |
414 | 418 | icon_size=Gtk.IconSize.LARGE_TOOLBAR) |