From aa4ff0b90f38a5d578daaafea3ce0f5173eb264a Mon Sep 17 00:00:00 2001 From: James Athey Date: Tue, 12 Apr 2011 11:32:43 -0400 Subject: [PATCH] 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 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c index 773c3524e..8e66ef1d5 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 */