backends: Drop get_relative_motion_deltas() vfunc

Just go ATM through backend checks, and looking up directly the
native event data, pretty much like the rest of the places do that...
Eventually would be nice to have this information in ClutterEvent,
but let's not have it clutter the MetaBackend class.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/852
This commit is contained in:
Carlos Garnacho
2019-10-09 17:35:15 +02:00
parent e9fbbd5853
commit f1d4d687f3
4 changed files with 10 additions and 58 deletions

View File

@@ -291,15 +291,21 @@ meta_wayland_pointer_send_relative_motion (MetaWaylandPointer *pointer,
uint32_t time_us_lo;
wl_fixed_t dxf, dyf;
wl_fixed_t dx_unaccelf, dy_unaccelf;
MetaBackend *backend = meta_get_backend ();
if (!pointer->focus_client)
return;
if (!meta_backend_get_relative_motion_deltas (meta_get_backend (),
event,
&dx, &dy,
&dx_unaccel, &dy_unaccel))
#ifdef HAVE_NATIVE_BACKEND
if (!META_IS_BACKEND_NATIVE (backend) ||
!meta_event_native_get_relative_motion (event,
&dx, &dy,
&dx_unaccel, &dy_unaccel))
return;
#else
if (META_IS_BACKEND_X11 (backend))
return;
#endif
#ifdef HAVE_NATIVE_BACKEND
time_us = meta_event_native_get_time_usec (event);