From 1d82e0f23650e3bc77e7b77724ccd5ea446adfa3 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 29 Mar 2021 13:53:07 +0200 Subject: [PATCH] core: Drop X11 error trap from pointer warping code This code is backend-agnostic, and should not do anything special about X11. Drop these error traps, and let the backend deal with the possible errors. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1725 Part-of: --- src/core/window.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index c843c62ee..ea56f3328 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -6889,6 +6889,7 @@ warp_grab_pointer (MetaWindow *window, MetaRectangle rect; MetaRectangle display_rect = { 0 }; MetaDisplay *display; + ClutterSeat *seat; display = window->display; meta_display_get_size (display, @@ -6921,8 +6922,6 @@ warp_grab_pointer (MetaWindow *window, *x = CLAMP (*x, 0, display_rect.width - 1); *y = CLAMP (*y, 0, display_rect.height - 1); - meta_x11_error_trap_push (display->x11_display); - meta_topic (META_DEBUG_WINDOW_OPS, "Warping pointer to %d,%d with window at %d,%d", *x, *y, rect.x, rect.y); @@ -6938,19 +6937,8 @@ warp_grab_pointer (MetaWindow *window, meta_window_get_frame_rect (window, &display->grab_anchor_window_pos); - { - ClutterSeat *seat; - - seat = clutter_backend_get_default_seat (clutter_get_default_backend ()); - clutter_seat_warp_pointer (seat, *x, *y); - } - - if (meta_x11_error_trap_pop_with_return (display->x11_display) != Success) - { - meta_verbose ("Failed to warp pointer for window %s", - window->desc); - return FALSE; - } + seat = clutter_backend_get_default_seat (clutter_get_default_backend ()); + clutter_seat_warp_pointer (seat, *x, *y); return TRUE; }