[mutter/wip/carlosg/warp-traps: 1/2] backends/x11: Add traps around XIPointerWarp call




commit 81b2c35a5817d2abc028bd860792a73bab690537
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 29 13:52:31 2021 +0200

    backends/x11: Add traps around XIPointerWarp call
    
    This is left up to higher level code, which is not too nice.

 src/backends/x11/meta-seat-x11.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index 5b899114d9..d43834bd7b 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -1493,12 +1493,14 @@ meta_seat_x11_warp_pointer (ClutterSeat *seat,
 {
   MetaSeatX11 *seat_x11 = META_SEAT_X11 (seat);
 
+  clutter_x11_trap_x_errors ();
   XIWarpPointer (clutter_x11_get_default_display (),
                  seat_x11->pointer_id,
                  None,
                  clutter_x11_get_root_window (),
                  0, 0, 0, 0,
                  x, y);
+  clutter_x11_untrap_x_errors ();
 }
 
 static uint32_t


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]