summaryrefslogtreecommitdiff
path: root/gdk/wayland
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2013-04-09 11:49:42 +0100
committerRob Bradford <rob@linux.intel.com>2013-04-09 12:52:16 +0100
commitb37d83e98825af0eb3b5e644701b36a24dfd6212 (patch)
tree9202388d7140b7ad2e91ce5e5c3a88a284cfadfa /gdk/wayland
parent7ffcd85d13ce954d66396c88243c6b2a9c31ffbc (diff)
downloadgtk+-b37d83e98825af0eb3b5e644701b36a24dfd6212.tar.gz
wayland: don't leave root window values uninitialised
Under Wayland we don't know the absolute position of the device but there are some API calls that expect to get an root window position. Previously we were not assigning any value to these out parameters potentially leaving the values undefined. This change returns the current surface relative position of the device.
Diffstat (limited to 'gdk/wayland')
-rw-r--r--gdk/wayland/gdkdevice-wayland.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 8cf8447204..c258be3316 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -255,13 +255,11 @@ gdk_wayland_device_query_state (GdkDevice *device,
*root_window = gdk_screen_get_root_window (default_screen);
if (child_window)
*child_window = wd->pointer_focus;
- /* Do something clever for relative here */
-#if 0
+ /* TODO: Do something clever for relative here */
if (root_x)
- *root_x = wd->x;
+ *root_x = wd->surface_x;
if (root_y)
- *root_y = wd->y;
-#endif
+ *root_y = wd->surface_y;
if (win_x)
*win_x = wd->surface_x;
if (win_y)