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

no XInput extension in X server.
This commit is contained in:
Raph Levien 1998-11-27 19:44:01 +00:00
parent f26c189e5b
commit 36d80dc374
9 changed files with 68 additions and 22 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,9 @@
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

View File

@ -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 = 0;
devices = XListInputDevices(display, &num_devices);
for(loop=0; loop<num_devices; loop++)
gdk_input_devices = NULL;
if (loop < num_extensions)
{
GdkDevicePrivate *gdkdev = gdk_input_device_new(&devices[loop],
/* XInput extension found */
devices = XListInputDevices(display, &num_devices);
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);

View File

@ -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 = 0;
devices = XListInputDevices(display, &num_devices);
for(loop=0; loop<num_devices; loop++)
gdk_input_devices = NULL;
if (loop < num_extensions)
{
GdkDevicePrivate *gdkdev = gdk_input_device_new(&devices[loop],
/* XInput extension found */
devices = XListInputDevices(display, &num_devices);
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);