summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkinput-x11.c
diff options
context:
space:
mode:
authorRaph Levien <raph@src.gnome.org>1998-11-27 19:44:01 +0000
committerRaph Levien <raph@src.gnome.org>1998-11-27 19:44:01 +0000
commit36d80dc374b055205b566552ada7c4e0c45764ee (patch)
tree595e464eab09c768778b50436453d172b2ff024d /gdk/x11/gdkinput-x11.c
parentf26c189e5b89bc21a24411358fa1fff4472ccca6 (diff)
downloadgtk+-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.c22
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);