[gnome-settings-daemon] cursor: Ignore PS/2 mice as well



commit d6d13dc3b5040dbc3bf639d0350c1f8de04f337e
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 8 12:17:34 2011 +0100

    cursor: Ignore PS/2 mice as well
    
    We really don't want to be checking for PS/2 mice. Just assume
    that if there's a touchscreen, you really don't have a PS/2 mouse
    plugged in your computer.

 plugins/cursor/gsd-cursor-manager.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/cursor/gsd-cursor-manager.c b/plugins/cursor/gsd-cursor-manager.c
index ac18bbf..5690386 100644
--- a/plugins/cursor/gsd-cursor-manager.c
+++ b/plugins/cursor/gsd-cursor-manager.c
@@ -125,6 +125,12 @@ set_cursor_visibility (GsdCursorManager *manager,
         manager->priv->cursor_shown = visible;
 }
 
+static gboolean
+device_info_is_ps2_mouse (XDeviceInfo *info)
+{
+	return (g_strcmp0 (info->name, "ImPS/2 Generic Wheel Mouse") == 0);
+}
+
 static void
 update_cursor_for_current (GsdCursorManager *manager)
 {
@@ -153,6 +159,9 @@ update_cursor_for_current (GsdCursorManager *manager)
                 if (device_info_is_touchscreen (&device_info[i]))
                         continue;
 
+                if (device_info_is_ps2_mouse (&device_info[i]))
+                        continue;
+
                 gdk_error_trap_push ();
                 device = XOpenDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), device_info[i].id);
                 if (gdk_error_trap_pop () || (device == NULL))



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