backends/native: Move away from ClutterInputDevice coords

Use a new set in MetaInputDeviceNative, this coexists with
ClutterInputDevice coords for the time being. This API will
eventually be only accessed from the input thread.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho
2020-06-05 23:43:54 +02:00
committed by Marge Bot
parent cb7794c19c
commit 7d78768809
3 changed files with 56 additions and 26 deletions

View File

@ -1495,3 +1495,23 @@ meta_input_device_native_set_mapping_mode (ClutterInputDevice *device,
device_native->mapping_mode = mapping;
}
void
meta_input_device_native_set_coords (MetaInputDeviceNative *device_native,
float x,
float y)
{
device_native->pointer_x = x;
device_native->pointer_y = y;
}
void
meta_input_device_native_get_coords (MetaInputDeviceNative *device_native,
float *x,
float *y)
{
if (x)
*x = device_native->pointer_x;
if (y)
*y = device_native->pointer_y;
}