[mutter/gnome-3-36] clutter/backend: Don't dispatch libinput events too early



commit a5cdef4c8a10ec2dd33f7c559499a6456ebfb2f9
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Tue Oct 27 10:27:48 2020 +0100

    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
    (cherry picked from commit c618b8a0eb1919219da29934945b303fd0a311ed)

 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 128d7c8aff..c6b542071c 100644
--- a/src/backends/native/meta-seat-native.c
+++ b/src/backends/native/meta-seat-native.c
@@ -2499,8 +2499,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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]