From c618b8a0eb1919219da29934945b303fd0a311ed Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 27 Oct 2020 10:27:48 +0100 Subject: [PATCH] clutter/backend: Don't dispatch libinput events too early At startup, libinput dispatch is called from the MetaSeatNative constructed callback. That means that we may get libinput events even before the default seat is set. In turn, processing those events may trigger the use the default seat while it's still not set yet, and cause a crash of gnome-shell/mutter at startup. A simple reproducer for this is to start gnome-shell/mutter with a tablet connected and the stylus in proximity, the proximity event will cause gnome-shell/mutter to crash at startup. To avoid that issue, avoid dispatching libinput events early from the MetaSeatNative constructed callback, those events will eventually get processed when the seat and the backend are all setup. https://gitlab.gnome.org/GNOME/mutter/-/issues/1501 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1534 --- src/backends/native/meta-seat-native.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c index 411636f32..6c1f44990 100644 --- a/src/backends/native/meta-seat-native.c +++ b/src/backends/native/meta-seat-native.c @@ -2537,8 +2537,6 @@ meta_seat_native_constructed (GObject *object) seat->udev_client = g_udev_client_new ((const gchar *[]) { "input", NULL }); - dispatch_libinput (seat); - source = meta_event_source_new (seat); seat->event_source = source;