backends/native: Pass ClutterSeat into virtual input device constructor

Avoid passing the MetaSeatImpl, since it may be potentially null at
MetaSeatNative construction time. An example of this triggering issues
are mousekeys, since those work on an emulated pointer device created
indirectly after a keyboard device is added (and the right settings are
enabled) at a time that the MetaSeatImpl is still being created, so the
MetaSeatNative cannot yet have a reference to it.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2869
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3278>
This commit is contained in:
Carlos Garnacho
2023-09-13 19:06:51 +02:00
parent 00bb4190b3
commit e056ce0ea3
4 changed files with 13 additions and 11 deletions

View File

@ -1036,7 +1036,7 @@ meta_virtual_input_device_native_constructed (GObject *object)
virtual_evdev->impl_state = g_new0 (ImplState, 1);
virtual_evdev->impl_state->device =
meta_input_device_native_new_virtual (virtual_evdev->seat->impl,
meta_input_device_native_new_virtual (CLUTTER_SEAT (virtual_evdev->seat),
device_type,
CLUTTER_INPUT_MODE_PHYSICAL);