[clutter] uniquely name and enable evdev ClutterInputDevice objects on creation



commit aa4ff0b90f38a5d578daaafea3ce0f5173eb264a
Author: James Athey <james athey unleashbts com>
Date:   Tue Apr 12 11:32:43 2011 -0400

    uniquely name and enable evdev ClutterInputDevice objects on creation
    
    http://bugzilla.clutter-project.org/show_bug.cgi?id=2631

 clutter/evdev/clutter-device-manager-evdev.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c
index 773c352..8e66ef1 100644
--- a/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/evdev/clutter-device-manager-evdev.c
@@ -531,12 +531,13 @@ evdev_add_device (ClutterDeviceManagerEvdev *manager_evdev,
   ClutterInputDeviceType type = CLUTTER_EXTENSION_DEVICE;
   ClutterInputDevice *device;
   ClutterActor *stage;
-  const gchar *device_file, *sysfs_path;
+  const gchar *device_file, *sysfs_path, *device_name;
   const gchar * const *keys;
   guint i;
 
   device_file = g_udev_device_get_device_file (udev_device);
   sysfs_path = g_udev_device_get_sysfs_path (udev_device);
+  device_name = g_udev_device_get_name (udev_device);
 
   if (device_file == NULL || sysfs_path == NULL)
     return;
@@ -571,10 +572,11 @@ evdev_add_device (ClutterDeviceManagerEvdev *manager_evdev,
 
   device = g_object_new (CLUTTER_TYPE_INPUT_DEVICE_EVDEV,
                          "id", 0,
-                         "name", "Evdev device", /* FIXME */
+                         "name", device_name,
                          "device-type", type,
                          "sysfs-path", sysfs_path,
                          "device-path", device_file,
+                         "enabled", TRUE,
                          NULL);
 
   /* Always associate the device to the default stage */



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