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>
This commit is contained in:
parent
d16afa8f16
commit
81ee0632c9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user