From ad8a7f0c50258bb2dd2573f9afda56b3a1e3a377 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 25 Jul 2018 11:01:55 +0200 Subject: 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 --- src/plugins/platforms/xcb/qxcbwindow.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp') 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) { -- cgit v1.2.3