[gtk+/gdk-backend-wayland] wayland: Only set x, y, and modifiers if the pointers are non-NULL



commit 1cd65aea5336cf2eb40adcaf5406fa1f9ec3359a
Author: Kristian Høgsberg <krh bitplanet net>
Date:   Fri Feb 11 17:07:19 2011 -0500

    wayland: Only set x, y, and modifiers if the pointers are non-NULL

 gdk/wayland/gdkdevice-wayland.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 20d28bf..2a051de 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -214,9 +214,12 @@ gdk_device_core_window_at_position (GdkDevice       *device,
   GdkWaylandDevice *wd;
 
   wd = GDK_DEVICE_CORE(device)->device;
-  *win_x = wd->surface_x;
-  *win_y = wd->surface_y;
-  *mask = wd->modifiers;
+  if (win_x)
+    *win_x = wd->surface_x;
+  if (win_y)
+    *win_y = wd->surface_y;
+  if (mask)
+    *mask = wd->modifiers;
 
   return wd->pointer_focus;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]