summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-03-29 13:53:07 +0200
committerCarlos Garnacho <carlosg@gnome.org>2021-03-29 13:54:06 +0200
commitb1938947e81d710bd13f72c54861199541130f65 (patch)
tree32a2fe645cb83ca75ef157abdf58a31310780d81
parent81b2c35a5817d2abc028bd860792a73bab690537 (diff)
downloadmutter-wip/carlosg/warp-traps.tar.gz
core: Drop X11 error trap from pointer warping codewip/carlosg/warp-traps
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
-rw-r--r--src/core/window.c18
1 files 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;
}