display: Pull the grab cursor from the cursor tracker

This might look silly, but just wait...
This commit is contained in:
Jasper St. Pierre 2014-04-23 11:12:04 -04:00
parent af515732b0
commit f42184ded8
3 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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,