[mutter/wip/carlosg/input-thread: 95/95] backends: Ensure to clear the last updated device on device removal




commit 29f33a47fc51000127d39e2d2fba3e292b3098c8
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.

 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 e2af93b1ca..679b440eca 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -498,6 +498,9 @@ on_device_removed (ClutterSeat        *seat,
     }
 
   g_hash_table_remove (priv->cursor_renderers, device);
+
+  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]