mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
display: Make sure to ungrab the pointer before starting a grab op
Now that we grab devices on the X11 connection, we can run into cross-connection issues. Since GTK+ frames are on the UI connection, they'll get the passive grab when we click on them. Forcibly ungrab on GTK+'s connection before attempting to take a grab on the backend connection ourselves.
This commit is contained in:
parent
1ef06207a4
commit
5b83bfb1db
@ -1800,6 +1800,15 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
if (pointer_already_grabbed)
|
if (pointer_already_grabbed)
|
||||||
display->grab_have_pointer = TRUE;
|
display->grab_have_pointer = TRUE;
|
||||||
|
|
||||||
|
/* Since grab operations often happen as a result of implicit
|
||||||
|
* pointer operations on the display X11 connection, we need
|
||||||
|
* to ungrab here to ensure that the backend's X11 can take
|
||||||
|
* the device grab. */
|
||||||
|
XIUngrabDevice (display->xdisplay,
|
||||||
|
META_VIRTUAL_CORE_POINTER_ID,
|
||||||
|
timestamp);
|
||||||
|
XSync (display->xdisplay, False);
|
||||||
|
|
||||||
meta_display_set_grab_op_cursor (display, op, timestamp);
|
meta_display_set_grab_op_cursor (display, op, timestamp);
|
||||||
|
|
||||||
if (!display->grab_have_pointer && !meta_grab_op_is_keyboard (op))
|
if (!display->grab_have_pointer && !meta_grab_op_is_keyboard (op))
|
||||||
|
Loading…
Reference in New Issue
Block a user