[gtk+/xi2: 1219/1239] Merge branch 'events-refactor' into xi2



commit e5cece6d7535750139aeec10f9ec5a279fa50f68
Merge: 3081042... 347065e...
Author: Carlos Garnacho <carlos gnome org>
Date:   Sat Sep 26 13:54:17 2009 +0200

    Merge branch 'events-refactor' into xi2
    
    Conflicts:
    	gdk/gdkdevice.c
    	gdk/x11/Makefile.am
    	gdk/x11/gdkdevicemanager-x11.c
    	gdk/x11/gdkevents-x11.c

 gdk/gdk.symbols                |   81 +-
 gdk/gdkdevice.c                |   13 -
 gdk/x11/Makefile.am            |    5 +-
 gdk/x11/gdkdevice-xi.c         |  123 ++
 gdk/x11/gdkdevice-xi.h         |   69 +
 gdk/x11/gdkdevicemanager-x11.c |   13 +-
 gdk/x11/gdkdevicemanager-xi.c  |  684 +++++++++
 gdk/x11/gdkdevicemanager-xi.h  |   53 +
 gdk/x11/gdkdisplay-x11.c       |  216 +++-
 gdk/x11/gdkevents-x11.c        | 3149 ----------------------------------------
 gdk/x11/gdkeventsource.c       |   37 +
 gdk/x11/gdkinput-none.c        |   11 -
 gdk/x11/gdkinput-x11.c         |  113 +-
 gdk/x11/gdkinput-xfree.c       |  128 +-
 gdk/x11/gdkinputprivate.h      |   58 +-
 gdk/x11/gdkmain-x11.c          |   11 +
 gdk/x11/gdkprivate-x11.h       |    3 +-
 gdk/x11/gdkscreen-x11.c        |  656 +++++++++-
 gdk/x11/gdkwindow-x11.c        |   55 +
 19 files changed, 2097 insertions(+), 3381 deletions(-)
---
diff --cc gdk/gdk.symbols
index 77cfd11,04ad233..91229ef
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@@ -421,16 -413,8 +430,10 @@@ gdk_devices_lis
  gdk_input_set_extension_events
  #endif
  #endif
 +#endif
 +#endif
  
  #if IN_HEADER(__GDK_DISPLAY_H__)
- #if IN_FILE(__GDK_EVENTS_X11_C__)
- gdk_display_add_client_message_filter
- #endif
- #endif
- 
- #if IN_HEADER(__GDK_DISPLAY_H__)
  #if IN_FILE(__GDK_DISPLAY_C__)
  gdk_display_close
  gdk_display_get_event
diff --cc gdk/x11/Makefile.am
index fd117ae,e23e793..7f27140
--- a/gdk/x11/Makefile.am
+++ b/gdk/x11/Makefile.am
@@@ -65,8 -63,10 +64,12 @@@ libgdk_x11_la_SOURCES =    	
  	xsettings-common.h	\
  	xsettings-common.c
  
 -if XINPUT_XFREE
 -libgdk_x11_la_SOURCES += gdkdevicemanager-xi.c gdkdevice-xi.c gdkinput-x11.c gdkinput-xfree.c
 +if XINPUT_2
 +libgdk_x11_la_SOURCES += gdkdevicemanager-xi2.c gdkdevice-xi2.c
++elif if XINPUT_XFREE
++libgdk_x11_la_SOURCES += gdkdevicemanager-xi.c gdkdevice-xi.c
+ else
+ libgdk_x11_la_SOURCES += gdkinput-none.c
  endif
  
  
diff --cc gdk/x11/gdkdevicemanager-x11.c
index b18d6b9,3f8e800..02f4ca2
--- a/gdk/x11/gdkdevicemanager-x11.c
+++ b/gdk/x11/gdkdevicemanager-x11.c
@@@ -21,9 -21,9 +21,13 @@@
  #include "gdkx.h"
  #include "gdkdevicemanager-core.h"
  
 -#ifdef XINPUT_XFREE
 -#include "gdkdevicemanager-xi.h"
 +#ifdef XINPUT_2
- #include "gdkdevicemanager-xi2.h"
- #endif /* XINPUT_2 */
++#  include "gdkdevicemanager-xi2.h"
++#else
++#  ifdef XINPUT_XFREE
++#    include "gdkdevicemanager-xi.h"
++#  endif
+ #endif
  
  GdkDeviceManager *
  _gdk_device_manager_new (GdkDisplay *display)
@@@ -41,26 -41,12 +45,31 @@@
        if (XQueryExtension (xdisplay, "XInputExtension",
                             &opcode, &firstevent, &firsterror))
          {
 +#if defined (XINPUT_2)
 +          major = 2;
 +          minor = 0;
 +
 +          if (XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
 +            {
 +              GdkDeviceManagerXI2 *device_manager_xi2;
 +
 +              device_manager = g_object_new (GDK_TYPE_DEVICE_MANAGER_XI2,
 +                                             "display", display,
 +                                             NULL);
 +
 +              device_manager_xi2 = GDK_DEVICE_MANAGER_XI2 (device_manager);
 +              device_manager_xi2->opcode = opcode;
 +
 +              return device_manager;
 +            }
++#else
+           return g_object_new (GDK_TYPE_DEVICE_MANAGER_XI,
+                                "display", display,
+                                "event-base", firstevent,
+                                NULL);
 +#endif
          }
 -#endif /* XINPUT_XFREE */
 +#endif /* XINPUT_2 || XINPUT_XFREE */
      }
  
    return g_object_new (GDK_TYPE_DEVICE_MANAGER_CORE,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]