1
0
Fork 0

uniquely name and enable evdev ClutterInputDevice objects on creation

http://bugzilla.clutter-project.org/show_bug.cgi?id=2631
This commit is contained in:
James Athey 2011-04-12 11:32:43 -04:00 committed by Emmanuele Bassi
parent a5fd1612f5
commit aa4ff0b90f

View file

@ -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 */