gdk: clean up logic error

Fallout from previous query_state() cleanups.
This commit is contained in:
Benjamin Otte 2012-03-09 12:36:11 -05:00 committed by Cosimo Cecchi
parent baa9e47601
commit 02f9d51177
2 changed files with 19 additions and 23 deletions

View File

@ -255,16 +255,14 @@ gdk_x11_device_core_query_state (GdkDevice *device,
display = gdk_window_get_display (window);
default_screen = gdk_display_get_default_screen (display);
if (GDK_X11_DISPLAY (display)->trusted_client &&
XQueryPointer (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
&xroot_window,
&xchild_window,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&xmask))
return;
else
if (!GDK_X11_DISPLAY (display)->trusted_client ||
!XQueryPointer (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
&xroot_window,
&xchild_window,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&xmask))
{
XSetWindowAttributes attributes;
Display *xdisplay;

View File

@ -329,19 +329,17 @@ gdk_x11_device_xi2_query_state (GdkDevice *device,
display = gdk_window_get_display (window);
default_screen = gdk_display_get_default_screen (display);
if (GDK_X11_DISPLAY (display)->trusted_client &&
XIQueryPointer (GDK_WINDOW_XDISPLAY (window),
device_xi2->device_id,
GDK_WINDOW_XID (window),
&xroot_window,
&xchild_window,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&button_state,
&mod_state,
&group_state))
return;
else
if (!GDK_X11_DISPLAY (display)->trusted_client ||
!XIQueryPointer (GDK_WINDOW_XDISPLAY (window),
device_xi2->device_id,
GDK_WINDOW_XID (window),
&xroot_window,
&xchild_window,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&button_state,
&mod_state,
&group_state))
{
XSetWindowAttributes attributes;
Display *xdisplay;