mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
x11: make _gdk_device_query_state report the master's device state
Calling XIQueryPointer() on a slave device is going to trigger a BadDevice X error. So in case we query a slave device state, ask the master device instead. https://bugzilla.gnome.org/show_bug.cgi?id=700233
This commit is contained in:
parent
201410de60
commit
ea6ac66392
@ -329,6 +329,16 @@ gdk_x11_device_xi2_query_state (GdkDevice *device,
|
||||
display = gdk_window_get_display (window);
|
||||
default_screen = gdk_display_get_default_screen (display);
|
||||
|
||||
if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_SLAVE)
|
||||
{
|
||||
GdkDevice *master = gdk_device_get_associated_device (device);
|
||||
|
||||
if (master)
|
||||
_gdk_device_query_state (master, window, root_window, child_window,
|
||||
root_x, root_y, win_x, win_y, mask);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GDK_X11_DISPLAY (display)->trusted_client ||
|
||||
!XIQueryPointer (GDK_WINDOW_XDISPLAY (window),
|
||||
device_xi2->device_id,
|
||||
|
Loading…
Reference in New Issue
Block a user