x11: Create the list of all devices correctly

Linked lists are tricky.
This commit is contained in:
Kristian Høgsberg 2011-01-06 07:57:26 -05:00 committed by Emmanuele Bassi
parent bf0dd2cbcc
commit 8c23766da8

View File

@ -220,11 +220,11 @@ clutter_device_manager_x11_get_devices (ClutterDeviceManager *manager)
*/
if (manager_x11->all_devices == NULL)
{
GSList *all_devices = NULL;
GSList *all_devices;
all_devices = manager_x11->devices;
all_devices = g_slist_prepend (all_devices, manager_x11->core_keyboard);
all_devices = g_slist_prepend (all_devices, manager_x11->core_pointer);
all_devices->next = manager_x11->devices;
manager_x11->all_devices = all_devices;
}