if (!menu_bar_p && !tool_bar_p)
{
- x_catch_errors (dpyinfo->display);
-
if (f && device->direct_p)
{
*finish = X_EVENT_DROP;
+
+ x_catch_errors (dpyinfo->display);
+
if (x_input_grab_touch_events)
XIAllowTouchEvents (dpyinfo->display, xev->deviceid,
xev->detail, xev->event, XIAcceptTouch);
if (source)
inev.ie.device = source->name;
}
+
+ x_uncatch_errors ();
}
#ifndef HAVE_GTK3
else if (x_input_grab_touch_events)
- XIAllowTouchEvents (dpyinfo->display, xev->deviceid,
- xev->detail, xev->event, XIRejectTouch);
+ {
+ x_ignore_errors_for_next_request (dpyinfo);
+ XIAllowTouchEvents (dpyinfo->display, xev->deviceid,
+ xev->detail, xev->event, XIRejectTouch);
+ x_stop_ignoring_errors (dpyinfo);
+ }
#endif
- x_uncatch_errors ();
}
else
{