]> Pileus Git - ~andy/gtk/commitdiff
Fixed gdk_input_devices being NULL when compiled with --xinput=xfree but
authorRaph Levien <raph@src.gnome.org>
Fri, 27 Nov 1998 19:44:01 +0000 (19:44 +0000)
committerRaph Levien <raph@src.gnome.org>
Fri, 27 Nov 1998 19:44:01 +0000 (19:44 +0000)
no XInput extension in X server.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdkinputcommon.h
gdk/x11/gdkinput-x11.c

index 9596e33bc8ce997d2060c6021191380735eba9c4..74de2d90f174cb577c84cd5e2a36863ed3a22a45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 9596e33bc8ce997d2060c6021191380735eba9c4..74de2d90f174cb577c84cd5e2a36863ed3a22a45 100644 (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
index 9596e33bc8ce997d2060c6021191380735eba9c4..74de2d90f174cb577c84cd5e2a36863ed3a22a45 100644 (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
index 9596e33bc8ce997d2060c6021191380735eba9c4..74de2d90f174cb577c84cd5e2a36863ed3a22a45 100644 (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
index 9596e33bc8ce997d2060c6021191380735eba9c4..74de2d90f174cb577c84cd5e2a36863ed3a22a45 100644 (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
index 9596e33bc8ce997d2060c6021191380735eba9c4..74de2d90f174cb577c84cd5e2a36863ed3a22a45 100644 (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
index 9596e33bc8ce997d2060c6021191380735eba9c4..74de2d90f174cb577c84cd5e2a36863ed3a22a45 100644 (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
index c4e21f4f1c62b35ab181b07aeedfd35b2631e667..e5394a37f102a2bafd3f3a58ba01153eb372f60c 100644 (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 = 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);
 
index c4e21f4f1c62b35ab181b07aeedfd35b2631e667..e5394a37f102a2bafd3f3a58ba01153eb372f60c 100644 (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 = 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);