backends: Set pointer constrain/relative motion hooks before backend init

The backend being initialized triggers a pointer warp (and motion event)
where we want to observe the callbacks put in place. So ensure we set
up the hooks before that could happen.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/852
This commit is contained in:
Carlos Garnacho 2019-11-11 19:21:09 +01:00
parent f0241114f6
commit 819ea8c0a6

View File

@ -344,8 +344,6 @@ meta_backend_native_post_init (MetaBackend *backend)
ClutterSeat *seat = clutter_backend_get_default_seat (clutter_backend);
MetaSettings *settings = meta_backend_get_settings (backend);
META_BACKEND_CLASS (meta_backend_native_parent_class)->post_init (backend);
meta_seat_native_set_pointer_constrain_callback (META_SEAT_NATIVE (seat),
pointer_constrain_callback,
NULL, NULL);
@ -353,6 +351,8 @@ meta_backend_native_post_init (MetaBackend *backend)
relative_motion_filter,
meta_backend_get_monitor_manager (backend));
META_BACKEND_CLASS (meta_backend_native_parent_class)->post_init (backend);
if (meta_settings_is_experimental_feature_enabled (settings,
META_EXPERIMENTAL_FEATURE_RT_SCHEDULER))
{