mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
cursor-tracker: Get the GDK (X11) pointer position in floats, not ints
This makes X11 consistent with Wayland which already uses floats. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1519
This commit is contained in:
parent
aff14eab86
commit
514b2ff424
@ -471,13 +471,13 @@ get_pointer_position_gdk (graphene_point_t *point,
|
|||||||
GdkSeat *gseat;
|
GdkSeat *gseat;
|
||||||
GdkDevice *gdevice;
|
GdkDevice *gdevice;
|
||||||
GdkScreen *gscreen;
|
GdkScreen *gscreen;
|
||||||
int x, y;
|
double x, y;
|
||||||
|
|
||||||
gseat = gdk_display_get_default_seat (gdk_display_get_default ());
|
gseat = gdk_display_get_default_seat (gdk_display_get_default ());
|
||||||
gdevice = gdk_seat_get_pointer (gseat);
|
gdevice = gdk_seat_get_pointer (gseat);
|
||||||
|
|
||||||
/* Even if point is NULL we need this to get gscreen */
|
/* Even if point is NULL we need this to get gscreen */
|
||||||
gdk_device_get_position (gdevice, &gscreen, &x, &y);
|
gdk_device_get_position_double (gdevice, &gscreen, &x, &y);
|
||||||
|
|
||||||
if (point)
|
if (point)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user