backends/native: Translate coordinates of absolute motion events

The motion events of tablets for example need to be mapped on the
selected screen area if the input device is configured to use only a
part of the active logical monitor.
To achieve this behavior each motion event is transformed using the
transformation matrix set for the input device.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1118
This commit is contained in:
Jonas Troeger 2020-03-31 22:11:37 +02:00 committed by Carlos Garnacho
parent f0718c7d95
commit 50fa002a19

View File

@ -424,6 +424,9 @@ new_absolute_motion_event (MetaSeatNative *seat,
meta_xkb_translate_state (event, seat->xkb, seat->button_state);
event->motion.x = x;
event->motion.y = y;
meta_input_device_native_translate_coordinates (input_device, stage,
&event->motion.x,
&event->motion.y);
event->motion.axes = axes;
clutter_event_set_device (event, seat->core_pointer);
clutter_event_set_source_device (event, input_device);