summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-03-27 11:51:02 +0100
committerMichal Klocek <michal.klocek@theqtcompany.com>2015-06-01 06:34:22 +0000
commit53d289ec4c0f512a3475da4bbf1f940cd6838ace (patch)
tree8eebcb92e851a58aa36f994757c235419c964454 /configure
parent2d7004c58752eda813496fcf8a7d2582e956ba5e (diff)
xcb: Use XIGrabDevice instead of xcb_grab_pointer with XI 2.2
Switch to using the pointer events from XI2 when touch is available (i.e. version is >= 2.2). This allows us to select and grab the button and motion events together with the touch ones. This prevents the issue of not getting touch events when grabbing via the plain xcb functions. To prevent touch sequences from being replayed after ungrabbing (for example after dismissing a popup that caused a grab), we try to accept touches via XIAllowTouchEvents. Unfortunately this leads to a deadlock and therefore we can only do it when we know we have a new enough libXi. This is a configure time check which is not ideal since the system on which apps run can have a newer libXi than the machine that did the Qt build, but seems like the best we can do. The environment variable QT_XCB_NO_XI2_MOUSE can be set to 1 in order to prevent processing mouse events through XInput. This restores the old behavior with broken grabbing. [ChangeLog][QtGui] Pointer event delivery on X11 is now done via XInput 2.2+ when available. Done-with: Michal Klocek <michal.klocek@theqtcompany.com> Done-with: Alexander Volkov <a.volkov@rusbitech.ru> Task-number: QTBUG-43525 Task-number: QTBUG-45054 Task-number: QTBUG-30417 Change-Id: I7cb2002b31bef4cd527aa427549dcf2d5467968e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure b/configure
index de0a1bd5d7..7251e8e673 100755
--- a/configure
+++ b/configure
@@ -5358,6 +5358,14 @@ fi
# auto-detect XInput2 support
if [ "$CFG_XINPUT2" != "no" ]; then
if compileTest x11/xinput2 "XInput2"; then
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xi 2>/dev/null; then
+ QMAKE_LIBXI_VERSION_MAJOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 1`
+ QMAKE_LIBXI_VERSION_MINOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 2`
+ QMAKE_LIBXI_VERSION_PATCH=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 3`
+ QMakeVar set QMAKE_LIBXI_VERSION_MAJOR "$QMAKE_LIBXI_VERSION_MAJOR"
+ QMakeVar set QMAKE_LIBXI_VERSION_MINOR "$QMAKE_LIBXI_VERSION_MINOR"
+ QMakeVar set QMAKE_LIBXI_VERSION_PATCH "$QMAKE_LIBXI_VERSION_PATCH"
+ fi
CFG_XINPUT2=yes
CFG_XINPUT=no
else