diff options
Diffstat (limited to 'gdk/gdkinputcommon.h')
-rw-r--r-- | gdk/gdkinputcommon.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gdk/gdkinputcommon.h b/gdk/gdkinputcommon.h index c4e21f4f1c..e5394a37f1 100644 --- a/gdk/gdkinputcommon.h +++ b/gdk/gdkinputcommon.h @@ -436,20 +436,22 @@ gdk_input_common_init(gint include_core) for (loop = 0; loop < num_extensions && (strcmp(extensions[loop], "XInputExtension") != 0); loop++); XFreeExtensionList(extensions); - if (loop == num_extensions) /* XInput extension not found */ - return FALSE; + gdk_input_devices = NULL; + if (loop < num_extensions) + { + /* XInput extension found */ - gdk_input_devices = 0; - devices = XListInputDevices(display, &num_devices); + devices = XListInputDevices(display, &num_devices); - for(loop=0; loop<num_devices; loop++) - { - GdkDevicePrivate *gdkdev = gdk_input_device_new(&devices[loop], + for(loop=0; loop<num_devices; loop++) + { + GdkDevicePrivate *gdkdev = gdk_input_device_new(&devices[loop], include_core); - if (gdkdev) - gdk_input_devices = g_list_append(gdk_input_devices, gdkdev); + if (gdkdev) + gdk_input_devices = g_list_append(gdk_input_devices, gdkdev); + } + XFreeDeviceList(devices); } - XFreeDeviceList(devices); gdk_input_devices = g_list_append (gdk_input_devices, &gdk_input_core_info); |