[gnome-settings-daemon] mouse: Remove devices from blacklist when gone



commit 5f6e6d3706c40920d7496d1cc31e252f134dc454
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Apr 18 16:47:33 2011 +0100

    mouse: Remove devices from blacklist when gone

 plugins/mouse/gsd-mouse-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index c889b98..f39f6b7 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -976,8 +976,14 @@ device_removed_cb (GdkDeviceManager *device_manager,
                    GsdMouseManager  *manager)
 {
         if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE) {
+                int id;
+
                 run_custom_command (device, COMMAND_DEVICE_REMOVED);
 
+                g_object_get (G_OBJECT (device), "device-id", &id, NULL);
+                g_hash_table_remove (manager->priv->blacklist,
+                                     GINT_TO_POINTER (id));
+
                 /* If a touchpad was to disappear... */
                 set_disable_w_typing (manager, g_settings_get_boolean (manager->priv->touchpad_settings, KEY_TOUCHPAD_DISABLE_W_TYPING));
         }



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