Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garnacho <carlos@lanedo.com>2012-10-04 14:47:31 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-10-04 16:27:49 (GMT)
commitb79a3919029d27287ab0c19f6facd12a7c1a4ae1 (patch)
treec7aef46dbf3085dc29266c87fc7607d7bb32cb28
parent81ee0632c9dafdb2d90f2986c3e70636ad529be6 (diff)
Put an error trap around XIAllowTouchEvents()
These calls are occasionally failing with BadAccess on seemingly still valid (not yet notified upon) touch sequences. Workaround this Xorg bug with error traps at the moment, those would catch no error when this is working properly. Fixing this bug will be tracked at SL #3981 Signed-off-by: Carlos Garnacho <carlos@lanedo.com> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar3/sugar-gesture-grabber.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sugar3/sugar-gesture-grabber.c b/src/sugar3/sugar-gesture-grabber.c
index 022ee5b..b1d28db 100644
--- a/src/sugar3/sugar-gesture-grabber.c
+++ b/src/sugar3/sugar-gesture-grabber.c
@@ -76,13 +76,15 @@ _sugar_gesture_grabber_notify_touch (SugarGestureGrabber *grabber,
if (data->consumed)
continue;
+ gdk_error_trap_push ();
XIAllowTouchEvents (gdk_x11_display_get_xdisplay (display),
gdk_x11_device_get_id (data->device),
GPOINTER_TO_INT (data->sequence),
gdk_x11_window_get_xid (priv->root_window),
(handled) ? XIAcceptTouch : XIRejectTouch);
- data->consumed = TRUE;
+ gdk_error_trap_pop_ignored ();
+ data->consumed = TRUE;
}
}
@@ -307,10 +309,12 @@ filter_function (GdkXEvent *xevent,
handled = _sugar_gesture_grabber_run_controllers (grabber, event);
if (!handled) {
+ gdk_error_trap_push ();
XIAllowTouchEvents (gdk_x11_display_get_xdisplay (display),
ev->deviceid, ev->detail,
gdk_x11_window_get_xid (priv->root_window),
XIRejectTouch);
+ gdk_error_trap_pop_ignored ();
} else if (event->type == GDK_TOUCH_BEGIN) {
_sugar_gesture_grabber_add_touch (grabber,
event->touch.device,