[gtk+] gdk: clean up logic error
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: clean up logic error
- Date: Fri, 9 Mar 2012 17:38:42 +0000 (UTC)
commit 02f9d511779a979e1616fbf49ca6850ab037c21b
Author: Benjamin Otte <otte redhat com>
Date: Fri Mar 9 12:36:11 2012 -0500
gdk: clean up logic error
Fallout from previous query_state() cleanups.
gdk/x11/gdkdevice-core-x11.c | 18 ++++++++----------
gdk/x11/gdkdevice-xi2.c | 24 +++++++++++-------------
2 files changed, 19 insertions(+), 23 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-core-x11.c b/gdk/x11/gdkdevice-core-x11.c
index 51cacb8..57a1975 100644
--- a/gdk/x11/gdkdevice-core-x11.c
+++ b/gdk/x11/gdkdevice-core-x11.c
@@ -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;
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index dc13f83..ef7e166 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]