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.
This commit is contained in:
Rob Bradford 2013-04-09 11:49:42 +01:00
parent 7ffcd85d13
commit b37d83e988

View File

@ -255,13 +255,11 @@ gdk_wayland_device_query_state (GdkDevice *device,
*root_window = gdk_screen_get_root_window (default_screen); *root_window = gdk_screen_get_root_window (default_screen);
if (child_window) if (child_window)
*child_window = wd->pointer_focus; *child_window = wd->pointer_focus;
/* Do something clever for relative here */ /* TODO: Do something clever for relative here */
#if 0
if (root_x) if (root_x)
*root_x = wd->x; *root_x = wd->surface_x;
if (root_y) if (root_y)
*root_y = wd->y; *root_y = wd->surface_y;
#endif
if (win_x) if (win_x)
*win_x = wd->surface_x; *win_x = wd->surface_x;
if (win_y) if (win_y)