mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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:
parent
f0718c7d95
commit
50fa002a19
@ -424,6 +424,9 @@ new_absolute_motion_event (MetaSeatNative *seat,
|
|||||||
meta_xkb_translate_state (event, seat->xkb, seat->button_state);
|
meta_xkb_translate_state (event, seat->xkb, seat->button_state);
|
||||||
event->motion.x = x;
|
event->motion.x = x;
|
||||||
event->motion.y = y;
|
event->motion.y = y;
|
||||||
|
meta_input_device_native_translate_coordinates (input_device, stage,
|
||||||
|
&event->motion.x,
|
||||||
|
&event->motion.y);
|
||||||
event->motion.axes = axes;
|
event->motion.axes = axes;
|
||||||
clutter_event_set_device (event, seat->core_pointer);
|
clutter_event_set_device (event, seat->core_pointer);
|
||||||
clutter_event_set_source_device (event, input_device);
|
clutter_event_set_source_device (event, input_device);
|
||||||
|
Loading…
Reference in New Issue
Block a user