display: Set the cursor when calling XIGrabDevice again

This commit is contained in:
Jasper St. Pierre 2013-12-05 16:45:29 -05:00
parent c36aa5e696
commit 82066e02c5

View File

@ -3862,6 +3862,7 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
{ {
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits }; XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
MetaCursor cursor = meta_cursor_for_grab_op (op);
XISetMask (mask.mask, XI_ButtonPress); XISetMask (mask.mask, XI_ButtonPress);
XISetMask (mask.mask, XI_ButtonRelease); XISetMask (mask.mask, XI_ButtonRelease);
@ -3876,7 +3877,7 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
META_VIRTUAL_CORE_POINTER_ID, META_VIRTUAL_CORE_POINTER_ID,
grab_xwindow, grab_xwindow,
timestamp, timestamp,
None, meta_display_create_x_cursor (display, cursor),
XIGrabModeAsync, XIGrabModeAsync, XIGrabModeAsync, XIGrabModeAsync,
False, /* owner_events */ False, /* owner_events */
&mask) == Success) &mask) == Success)
@ -3895,7 +3896,7 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
meta_error_trap_pop (display); meta_error_trap_pop (display);
meta_cursor_tracker_set_grab_cursor (screen->cursor_tracker, meta_cursor_for_grab_op (op)); meta_cursor_tracker_set_grab_cursor (screen->cursor_tracker, cursor);
} }
gboolean gboolean