backends/x11: Pass the seat to the input settings

Input settings requires a valid seat in order to initialize the a11y
settings (since commit 1609d145), however in X11 we never set it and
even if we create the input settings early (as per commit 7547891a) we
never initialize the seat for it.

This leads to startup critical errors on X11:
 clutter_seat_get_pointer_a11y_settings: assertion
   'CLUTTER_IS_SEAT (seat)' failed

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1763>
This commit is contained in:
Marco Trevisan (Treviño) 2021-03-09 18:45:04 +01:00 committed by Marge Bot
parent b353b97512
commit 8d008112b6

View File

@ -92,14 +92,14 @@ meta_backend_x11_cm_post_init (MetaBackend *backend)
MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (backend); MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (backend);
ClutterSeat *seat; ClutterSeat *seat;
x11_cm->input_settings = g_object_new (META_TYPE_INPUT_SETTINGS_X11, NULL);
parent_backend_class->post_init (backend);
seat = clutter_backend_get_default_seat (clutter_get_default_backend ()); seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
g_signal_connect_object (seat, "device-added", g_signal_connect_object (seat, "device-added",
G_CALLBACK (on_device_added), backend, 0); G_CALLBACK (on_device_added), backend, 0);
x11_cm->input_settings = g_object_new (META_TYPE_INPUT_SETTINGS_X11,
"seat", seat, NULL);
parent_backend_class->post_init (backend);
take_touch_grab (backend); take_touch_grab (backend);
} }