From f42184ded81c86171a15eeb6cea1be03d83ff47d Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 23 Apr 2014 11:12:04 -0400 Subject: [PATCH] display: Pull the grab cursor from the cursor tracker This might look silly, but just wait... --- src/backends/meta-cursor-tracker-private.h | 2 ++ src/backends/meta-cursor-tracker.c | 6 ++++++ src/core/display.c | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/backends/meta-cursor-tracker-private.h b/src/backends/meta-cursor-tracker-private.h index dd6c36434..2f20adf52 100644 --- a/src/backends/meta-cursor-tracker-private.h +++ b/src/backends/meta-cursor-tracker-private.h @@ -83,4 +83,6 @@ void meta_cursor_tracker_update_position (MetaCursorTracker *tracker, int new_x, int new_y); +MetaCursorReference * meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker); + #endif diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c index 128ae1c33..25117249e 100644 --- a/src/backends/meta-cursor-tracker.c +++ b/src/backends/meta-cursor-tracker.c @@ -480,3 +480,9 @@ meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker, tracker->screen->xroot); } } + +MetaCursorReference * +meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker) +{ + return tracker->displayed_cursor; +} diff --git a/src/core/display.c b/src/core/display.c index 53f33f8b5..c982f8fa2 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1749,7 +1749,9 @@ meta_display_set_grab_op_cursor (MetaDisplay *display, XISetMask (mask.mask, XI_Leave); XISetMask (mask.mask, XI_Motion); - MetaCursor cursor = meta_cursor_for_grab_op (op); + MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (display->screen); + MetaCursorReference *cursor_ref = meta_cursor_tracker_get_displayed_cursor (tracker); + MetaCursor cursor = meta_cursor_reference_get_meta_cursor (cursor_ref); meta_error_trap_push (display); if (XIGrabDevice (display->xdisplay,