Commit 36d80dc3 authored by Raph Levien's avatar Raph Levien

Fixed gdk_input_devices being NULL when compiled with --xinput=xfree but

no XInput extension in X server.
parent f26c189e
Fri Nov 27 11:41:27 1998 Raph Levien <raph@gimp.org>
* gdk/gdkinputcommon.h (gdk_input_common_init): Fixed it so that
it still includes the core pointer in gdk_input_devices even
if the XInput extension is not present in the X server.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
......
Fri Nov 27 11:41:27 1998 Raph Levien <raph@gimp.org>
* gdk/gdkinputcommon.h (gdk_input_common_init): Fixed it so that
it still includes the core pointer in gdk_input_devices even
if the XInput extension is not present in the X server.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
......
Fri Nov 27 11:41:27 1998 Raph Levien <raph@gimp.org>
* gdk/gdkinputcommon.h (gdk_input_common_init): Fixed it so that
it still includes the core pointer in gdk_input_devices even
if the XInput extension is not present in the X server.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
......
Fri Nov 27 11:41:27 1998 Raph Levien <raph@gimp.org>
* gdk/gdkinputcommon.h (gdk_input_common_init): Fixed it so that
it still includes the core pointer in gdk_input_devices even
if the XInput extension is not present in the X server.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
......
Fri Nov 27 11:41:27 1998 Raph Levien <raph@gimp.org>
* gdk/gdkinputcommon.h (gdk_input_common_init): Fixed it so that
it still includes the core pointer in gdk_input_devices even
if the XInput extension is not present in the X server.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
......
Fri Nov 27 11:41:27 1998 Raph Levien <raph@gimp.org>
* gdk/gdkinputcommon.h (gdk_input_common_init): Fixed it so that
it still includes the core pointer in gdk_input_devices even
if the XInput extension is not present in the X server.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
......
Fri Nov 27 11:41:27 1998 Raph Levien <raph@gimp.org>
* gdk/gdkinputcommon.h (gdk_input_common_init): Fixed it so that
it still includes the core pointer in gdk_input_devices even
if the XInput extension is not present in the X server.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment