mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
clutter: Do not poke backend code for motion compression
We now have all info available in ClutterEvent, use it and stop poking backend internals. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
This commit is contained in:

committed by
Marge Bot

parent
0842ac936f
commit
e21929be82
@ -341,32 +341,6 @@ meta_seat_native_get_supported_virtual_device_types (ClutterSeat *seat)
|
||||
CLUTTER_VIRTUAL_DEVICE_TYPE_TOUCHSCREEN);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_seat_native_compress_motion (ClutterSeat *seat,
|
||||
ClutterEvent *event,
|
||||
const ClutterEvent *to_discard)
|
||||
{
|
||||
double dx, dy;
|
||||
double dx_unaccel, dy_unaccel;
|
||||
double dst_dx = 0.0, dst_dy = 0.0;
|
||||
double dst_dx_unaccel = 0.0, dst_dy_unaccel = 0.0;
|
||||
|
||||
if (!clutter_event_get_relative_motion (to_discard,
|
||||
&dx, &dy,
|
||||
&dx_unaccel, &dy_unaccel))
|
||||
return;
|
||||
|
||||
clutter_event_get_relative_motion (event,
|
||||
&dst_dx, &dst_dy,
|
||||
&dst_dx_unaccel, &dst_dy_unaccel);
|
||||
|
||||
event->motion.flags |= CLUTTER_EVENT_FLAG_RELATIVE_MOTION;
|
||||
event->motion.dx = dx + dst_dx;
|
||||
event->motion.dy = dy + dst_dy;
|
||||
event->motion.dx_unaccel = dx_unaccel + dst_dx_unaccel;
|
||||
event->motion.dy_unaccel = dy_unaccel + dst_dy_unaccel;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_seat_native_warp_pointer (ClutterSeat *seat,
|
||||
int x,
|
||||
@ -408,7 +382,6 @@ meta_seat_native_class_init (MetaSeatNativeClass *klass)
|
||||
seat_class->get_keymap = meta_seat_native_get_keymap;
|
||||
seat_class->create_virtual_device = meta_seat_native_create_virtual_device;
|
||||
seat_class->get_supported_virtual_device_types = meta_seat_native_get_supported_virtual_device_types;
|
||||
seat_class->compress_motion = meta_seat_native_compress_motion;
|
||||
seat_class->warp_pointer = meta_seat_native_warp_pointer;
|
||||
seat_class->handle_event_post = meta_seat_native_handle_event_post;
|
||||
seat_class->query_state = meta_seat_native_query_state;
|
||||
|
Reference in New Issue
Block a user