mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
backends/native: Fix relative motion filtering for tablet tools
This was somewhat ineffective since it was applied after figuring out the x/y absolute coordinates. Change the order (filter first, then figure out abs coords), and use coordinates from the correct device while at it. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3012>
This commit is contained in:
parent
26d13f4269
commit
558f3156dc
@ -1300,16 +1300,17 @@ notify_relative_tool_motion_in_impl (ClutterInputDevice *input_device,
|
|||||||
|
|
||||||
device_native = META_INPUT_DEVICE_NATIVE (input_device);
|
device_native = META_INPUT_DEVICE_NATIVE (input_device);
|
||||||
seat_impl = seat_impl_from_device (input_device);
|
seat_impl = seat_impl_from_device (input_device);
|
||||||
x = device_native->pointer_x + dx;
|
|
||||||
y = device_native->pointer_y + dy;
|
|
||||||
|
|
||||||
meta_seat_impl_filter_relative_motion (seat_impl,
|
meta_seat_impl_filter_relative_motion (seat_impl,
|
||||||
input_device,
|
input_device,
|
||||||
seat_impl->pointer_x,
|
device_native->pointer_x,
|
||||||
seat_impl->pointer_y,
|
device_native->pointer_y,
|
||||||
&dx,
|
&dx,
|
||||||
&dy);
|
&dy);
|
||||||
|
|
||||||
|
x = device_native->pointer_x + dx;
|
||||||
|
y = device_native->pointer_y + dy;
|
||||||
|
|
||||||
event = new_absolute_motion_event (seat_impl, input_device, time_us,
|
event = new_absolute_motion_event (seat_impl, input_device, time_us,
|
||||||
x, y, axes);
|
x, y, axes);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user