]> Pileus Git - ~andy/gtk/commitdiff
Non-XInput2 build fix
authorPatrick Welche <prlw1@cam.ac.uk>
Mon, 9 Jan 2012 11:27:28 +0000 (11:27 +0000)
committerPatrick Welche <prlw1@cam.ac.uk>
Tue, 10 Jan 2012 13:54:22 +0000 (13:54 +0000)
The part in gdkwindow-x11.c which uses XIEvent and friends is "protected"
by HAVE_XGENERICEVENTS, i.e., XGetEventData() has been found. (Xlib.h)

XIEvent and friends are defined in <X11/extension/XInput2.h> which is
included by gdkdisplay-x11.h if XINPUT_2 is defined.

The patch makes sure XIEvent is only used if XINPUT_2 is defined.

https://bugzilla.gnome.org/show_bug.cgi?id=667534

gdk/x11/gdkwindow-x11.c

index 7773fd7497853dffabb2347f6599e07a2f1e6cb3..1f61764ea6f4b908e07830135dfc1ae9985baa8e 100644 (file)
@@ -4366,7 +4366,7 @@ _gdk_x11_moveresize_handle_event (XEvent *event)
         finish_drag (mv_resize);
       break;
 
-#ifdef HAVE_XGENERICEVENTS
+#if defined (HAVE_XGENERICEVENTS) && defined (XINPUT_2)
     case GenericEvent:
       {
         /* we just assume this is an XI2 event */