forked from AuroraMiddleware/gtk
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:
parent
7ffcd85d13
commit
b37d83e988
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user