diff options
author | Carlos Garnacho <carlos@lanedo.com> | 2012-10-03 07:37:37 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-10-03 12:48:57 (GMT) |
commit | 81ee0632c9dafdb2d90f2986c3e70636ad529be6 (patch) | |
tree | 82ca24eb625768e4290847e732708d978e6ca098 | |
parent | d16afa8f166be2a1ea51efadc0244cc5315d2b2c (diff) |
gesture-grabber: Ignore events not meant for the root window
The passive touch grab is set on the root window, so if touch
events get to a different window it's best to leave those for
GTK+ to handle.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r-- | src/sugar3/sugar-gesture-grabber.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sugar3/sugar-gesture-grabber.c b/src/sugar3/sugar-gesture-grabber.c index 63673a4..022ee5b 100644 --- a/src/sugar3/sugar-gesture-grabber.c +++ b/src/sugar3/sugar-gesture-grabber.c @@ -256,6 +256,7 @@ filter_function (GdkXEvent *xevent, SugarGestureGrabber *grabber; SugarGestureGrabberPriv *priv; gboolean handled = FALSE; + Window event_window; GdkDevice *device; XIDeviceEvent *ev; GdkDisplay *display; @@ -285,6 +286,9 @@ filter_function (GdkXEvent *xevent, return GDK_FILTER_CONTINUE; } + if (ev->event != gdk_x11_window_get_xid (priv->root_window)) + return GDK_FILTER_CONTINUE; + event->touch.window = g_object_ref (priv->root_window); event->touch.time = ev->time; event->touch.x = ev->event_x; |