summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-15 16:56:57 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-12 18:49:21 (GMT)
commite5dfa0cdc5df3ebe75feb72cb937e4118da5459f (patch)
treeaea88fc345205f5efb9327ceaea42f484bad2004
parentf1016bc7b3f0e6c7680035e8b0c67152a8b4607d (diff)
downloadQt-e5dfa0cdc5df3ebe75feb72cb937e4118da5459f.zip
Qt-e5dfa0cdc5df3ebe75feb72cb937e4118da5459f.tar.gz
Qt-e5dfa0cdc5df3ebe75feb72cb937e4118da5459f.tar.bz2
Wrapped the XInput include with an ifdef.
That should fix compilation on platforms that do not have xinput headers installed. Reviewed-by: Thiago Macieira (cherry picked from commit 0a13188468997d6c3253db5b29f05a119945f131)
-rw-r--r--src/gui/kernel/qapplication_x11.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index d5106aa..413e003 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -117,7 +117,9 @@ extern "C" {
#define XK_MISCELLANY
#include <X11/keysymdef.h>
+#if !defined(QT_NO_XINPUT)
#include <X11/extensions/XI.h>
+#endif
#include <stdlib.h>
#include <string.h>
@@ -638,11 +640,13 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
break;
default:
+#if !defined(QT_NO_XINPUT)
if (err->request_code == X11->xinput_major
&& err->error_code == (X11->xinput_errorbase + XI_BadDevice)
&& err->minor_code == 3 /* X_OpenDevice */) {
return 0;
}
+#endif
break;
}