[mutter/wip/carlosg/ignore-device-events: 4/4] backends: Ensure to clear the last updated device on device removal




commit 56e6717bebd2f6bc642ff44a38ffc65fdc888f6c
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Sep 25 18:51:37 2020 +0200

    backends: Ensure to clear the last updated device on device removal
    
    If the last updated device is removed, ensure that it does result in
    a ::last-device-changed with a NULL device.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403

 src/backends/meta-backend.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index 2ecbfe7417..97c7714076 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -456,6 +456,9 @@ on_device_removed (ClutterSeat        *seat,
                                                    !has_touchscreen);
         }
     }
+
+  if (priv->current_device == device)
+    meta_backend_update_last_device (backend, NULL);
 }
 
 static void


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