[mutter/gnome-3-36] clutter/event: Do not filter out DEVICE_ADDED/REMOVED events



commit 41434d548858e1f07da045cd3b6b0f10140fcde1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Nov 6 17:59:33 2020 +0100

    clutter/event: Do not filter out DEVICE_ADDED/REMOVED events
    
    These devices in x11 are "disabled", that doesn't mean we should refrain
    from notifying about them.
    
    Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1476
    Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1496
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1553
    
    (cherry-picked from commit 34710eabc0dc2154d26296f3121728683af4afe6)

 clutter/clutter/clutter-event.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-event.c b/clutter/clutter/clutter-event.c
index 8a78960918..7586a59c52 100644
--- a/clutter/clutter/clutter-event.c
+++ b/clutter/clutter/clutter-event.c
@@ -1582,7 +1582,9 @@ _clutter_event_push (const ClutterEvent *event,
   device = clutter_event_get_device (event);
   if (device != NULL)
     {
-      if (!clutter_input_device_get_enabled (device))
+      if (event->type != CLUTTER_DEVICE_ADDED &&
+          event->type != CLUTTER_DEVICE_REMOVED &&
+          !clutter_input_device_get_enabled (device))
         return;
     }
 


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