summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/xcb.pro
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2012-09-26 16:25:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-02 13:22:49 +0200
commit341dcae472553f20d4ed91897f05637523922c1b (patch)
tree18ca3e8927eb2203945a39934c8ea05cbac474b6 /src/plugins/platforms/xcb/xcb.pro
parente840b8b2e3d62dfc222b672a0ba32e7da8dc159e (diff)
Fix a crash with xcb on 64bit systems when hitting any key.
xcb uses 32bits for xcb_keysym_t, but Xlib uses 64bit longs on 64bits systems for KeySym and all other XIDs on the client side. Passing an xcb_keysym_t* to XLookupString, expecting a KeySym*, would overwrite the next 32bits in memory and possibly cause a crash. This patch makes sure that a KeySym* is passed to XLookupString, and use the signature declared in Xutil.h to make sure the types are right. Encapsulate it in qxlibconvenience.cpp since including Xutil.h inside qxcbkeyboard.cpp causes macro expansion problems. Change-Id: I68451a24cb44a43dfa4382b5dce1ea7845f14e26 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
Diffstat (limited to 'src/plugins/platforms/xcb/xcb.pro')
-rw-r--r--src/plugins/platforms/xcb/xcb.pro6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro
index df37e59365..116951d36d 100644
--- a/src/plugins/platforms/xcb/xcb.pro
+++ b/src/plugins/platforms/xcb/xcb.pro
@@ -20,7 +20,8 @@ SOURCES = \
main.cpp \
qxcbnativeinterface.cpp \
qxcbcursor.cpp \
- qxcbimage.cpp
+ qxcbimage.cpp \
+ qxlibconvenience.cpp
HEADERS = \
qxcbclipboard.h \
@@ -36,7 +37,8 @@ HEADERS = \
qxcbwmsupport.h \
qxcbnativeinterface.h \
qxcbcursor.h \
- qxcbimage.h
+ qxcbimage.h \
+ qxlibconvenience.h
contains(QT_CONFIG, xcb-poll-for-queued-event) {
DEFINES += XCB_POLL_FOR_QUEUED_EVENT