mirror of
https://github.com/brl/mutter.git
synced 2025-08-04 23:54:40 +00:00
cursor: Don't access the cursor tracker from the screen directly
Go through the get_for_screen getter.
This commit is contained in:
@@ -1768,6 +1768,7 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
{
|
||||
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
|
||||
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
|
||||
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (screen);
|
||||
MetaCursor cursor = meta_cursor_for_grab_op (op);
|
||||
MetaCursorReference *cursor_ref;
|
||||
|
||||
@@ -1803,8 +1804,8 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
|
||||
meta_error_trap_pop (display);
|
||||
|
||||
cursor_ref = meta_cursor_reference_from_theme (screen->cursor_tracker, cursor);
|
||||
meta_cursor_tracker_set_grab_cursor (screen->cursor_tracker, cursor_ref);
|
||||
cursor_ref = meta_cursor_reference_from_theme (tracker, cursor);
|
||||
meta_cursor_tracker_set_grab_cursor (tracker, cursor_ref);
|
||||
meta_cursor_reference_unref (cursor_ref);
|
||||
}
|
||||
|
||||
@@ -1980,9 +1981,11 @@ void
|
||||
meta_display_end_grab_op (MetaDisplay *display,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaCursorTracker *tracker;
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Ending grab op %u at time %u\n", display->grab_op, timestamp);
|
||||
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
return;
|
||||
|
||||
@@ -2025,7 +2028,8 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
meta_screen_ungrab_all_keys (display->screen, timestamp);
|
||||
}
|
||||
|
||||
meta_cursor_tracker_set_grab_cursor (display->screen->cursor_tracker, NULL);
|
||||
tracker = meta_cursor_tracker_get_for_screen (display->screen);
|
||||
meta_cursor_tracker_set_grab_cursor (tracker, NULL);
|
||||
|
||||
display->grab_timestamp = 0;
|
||||
display->grab_window = NULL;
|
||||
|
Reference in New Issue
Block a user