summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-25 11:01:55 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-25 09:14:55 +0000
commitad8a7f0c50258bb2dd2573f9afda56b3a1e3a377 (patch)
tree5a98bf430abb14e7744318261fe5f15d569b35bd /src/plugins/platforms/xcb/qxcbwindow.cpp
parent708fa860bc877995256f08cd55bf1421d510e5f3 (diff)
xcb: Fix build when xinput2 is not available
Fix the #ifdefs. Amends 3bc0f1724ae49c2fd7e6d7bcb650350d20d12246. Task-number: QTBUG-68501 Task-number: QTBUG-51385 Task-number: QTBUG-32476 Change-Id: Icc6421fe2e91a3b29bcec8cb1a8a91cb71ae3172 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 8c096ddc74..9b6376f39e 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2632,16 +2632,15 @@ bool QXcbWindow::startSystemMove(const QPoint &pos)
bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int corner)
{
+#if QT_CONFIG(xinput2)
const xcb_atom_t moveResize = connection()->atom(QXcbAtom::_NET_WM_MOVERESIZE);
if (!connection()->wmSupport()->isSupportedByWM(moveResize))
return false;
const QPoint globalPos = QHighDpi::toNativePixels(window()->mapToGlobal(pos), window()->screen());
- bool startedByTouch = false;
#ifdef XCB_USE_XINPUT22
// ### FIXME QTBUG-53389
- startedByTouch = connection()->startSystemMoveResizeForTouchBegin(m_window, globalPos, corner);
-#endif
+ bool startedByTouch = connection()->startSystemMoveResizeForTouchBegin(m_window, globalPos, corner);
if (startedByTouch) {
if (connection()->isUnity() || connection()->isGnome()) {
// These desktops fail to move/resize via _NET_WM_MOVERESIZE (WM bug?).
@@ -2649,7 +2648,9 @@ bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int corner)
return false;
}
// KWin, Openbox, AwesomeWM have been tested to work with _NET_WM_MOVERESIZE.
- } else { // Started by mouse press.
+ } else
+#endif
+ { // Started by mouse press.
if (!connection()->hasXInput2() || connection()->xi2MouseEventsDisabled()) {
// Without XI2 we can't get button press/move/release events.
return false;
@@ -2661,6 +2662,11 @@ bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int corner)
}
return true;
+#else
+ Q_UNUSED(pos);
+ Q_UNUSED(corner);
+ return false;
+#endif
}
void QXcbWindow::doStartSystemMoveResize(const QPoint &globalPos, int corner)
{