diff options
author | Raph Levien <raph@src.gnome.org> | 1998-11-27 19:44:01 +0000 |
---|---|---|
committer | Raph Levien <raph@src.gnome.org> | 1998-11-27 19:44:01 +0000 |
commit | 36d80dc374b055205b566552ada7c4e0c45764ee (patch) | |
tree | 595e464eab09c768778b50436453d172b2ff024d /gdk/x11/gdkinput-x11.c | |
parent | f26c189e5b89bc21a24411358fa1fff4472ccca6 (diff) | |
download | gtk+-36d80dc374b055205b566552ada7c4e0c45764ee.tar.gz |
Fixed gdk_input_devices being NULL when compiled with --xinput=xfree but
no XInput extension in X server.
Diffstat (limited to 'gdk/x11/gdkinput-x11.c')
-rw-r--r-- | gdk/x11/gdkinput-x11.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gdk/x11/gdkinput-x11.c b/gdk/x11/gdkinput-x11.c index c4e21f4f1c..e5394a37f1 100644 --- a/gdk/x11/gdkinput-x11.c +++ b/gdk/x11/gdkinput-x11.c @@ -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); |