diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-02 14:42:45 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-29 13:09:05 +0200 |
commit | 50b9addb08b04f365d0f2d3439291523fa858e8d (patch) | |
tree | f26bbba26d5468ec40099a61994ee9b78a03261e /src/client | |
parent | 48e30da0902ba0775a04745d091abea49742fb89 (diff) |
Adapt to recent qtbase changes and update dependencies
- moving linuxaccessibility/xkbcommon/eglsupport/glxsupport to QtGui
- event refactoring
Task-number: QTBUG-83255
Change-Id: Ic82ee6ef5652413781468edb58c601ee7dce2e3b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/.prev_CMakeLists.txt | 13 | ||||
-rw-r--r-- | src/client/CMakeLists.txt | 13 | ||||
-rw-r--r-- | src/client/client.pro | 9 | ||||
-rw-r--r-- | src/client/qwaylanddisplay_p.h | 2 | ||||
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 16 | ||||
-rw-r--r-- | src/client/qwaylandinputdevice_p.h | 2 | ||||
-rw-r--r-- | src/client/qwaylandintegration.cpp | 4 | ||||
-rw-r--r-- | src/client/qwaylandnativeinterface.cpp | 2 | ||||
-rw-r--r-- | src/client/qwaylandtouch.cpp | 11 |
9 files changed, 22 insertions, 50 deletions
diff --git a/src/client/.prev_CMakeLists.txt b/src/client/.prev_CMakeLists.txt index 5b1a73e5a..ac323a56f 100644 --- a/src/client/.prev_CMakeLists.txt +++ b/src/client/.prev_CMakeLists.txt @@ -56,6 +56,7 @@ qt_add_module(WaylandClient LIBRARIES Qt::CorePrivate Qt::GuiPrivate + Qt::PlatformHeadersPrivate PUBLIC_LIBRARIES Qt::Core Qt::Gui @@ -87,18 +88,6 @@ qt6_generate_wayland_protocol_client_sources(WaylandClient ## Scopes: ##################################################################### -qt_extend_target(WaylandClient CONDITION QT_FEATURE_xkbcommon - LIBRARIES - Qt::XkbCommonSupportPrivate - PRIVATE_MODULE_INTERFACE - Qt::XkbCommonSupportPrivate -) - -qt_extend_target(WaylandClient CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate - LIBRARIES - Qt::LinuxAccessibilitySupportPrivate -) - qt_extend_target(WaylandClient CONDITION QT_FEATURE_clipboard SOURCES qwaylandclipboard.cpp qwaylandclipboard_p.h diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 362b721be..b49a72920 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -56,6 +56,7 @@ qt_add_module(WaylandClient LIBRARIES Qt::CorePrivate Qt::GuiPrivate + Qt::PlatformHeadersPrivate PUBLIC_LIBRARIES Qt::Core Qt::Gui @@ -87,18 +88,6 @@ qt6_generate_wayland_protocol_client_sources(WaylandClient ## Scopes: ##################################################################### -qt_extend_target(WaylandClient CONDITION QT_FEATURE_xkbcommon - LIBRARIES - Qt::XkbCommonSupportPrivate - PRIVATE_MODULE_INTERFACE - Qt::XkbCommonSupportPrivate -) - -qt_extend_target(WaylandClient CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate - LIBRARIES - Qt::LinuxAccessibilitySupportPrivate -) - qt_extend_target(WaylandClient CONDITION QT_FEATURE_clipboard SOURCES qwaylandclipboard.cpp qwaylandclipboard_p.h diff --git a/src/client/client.pro b/src/client/client.pro index bdcf42561..38b129e9e 100644 --- a/src/client/client.pro +++ b/src/client/client.pro @@ -3,6 +3,8 @@ MODULE = waylandclient QT += core-private gui-private +QT_PRIVATE += platformheaders-private + # We have a bunch of C code with casts, so we can't have this option QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual @@ -13,13 +15,6 @@ use_gold_linker: CONFIG += no_linker_version_script CONFIG -= precompile_header CONFIG += link_pkgconfig wayland-scanner -qtConfig(xkbcommon) { - QT_FOR_PRIVATE += xkbcommon_support-private -} - -qtHaveModule(linuxaccessibility_support-private): \ - QT_PRIVATE += linuxaccessibility_support-private - QMAKE_USE += wayland-client INCLUDEPATH += $$PWD/../shared diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h index 818b5ba90..d386c66ac 100644 --- a/src/client/qwaylanddisplay_p.h +++ b/src/client/qwaylanddisplay_p.h @@ -66,7 +66,7 @@ #include <qpa/qplatforminputcontextfactory_p.h> #if QT_CONFIG(xkbcommon) -#include <QtXkbCommonSupport/private/qxkbcommon_p.h> +#include <QtGui/private/qxkbcommon_p.h> #endif struct wl_cursor_image; diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index af9458b44..e86274276 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -1428,16 +1428,16 @@ void QWaylandInputDevice::handleTouchPoint(int id, Qt::TouchPointState state, co } // If the touch point was pressed earlier this frame, we don't want to overwrite its state. - if (tp.state != Qt::TouchPointPressed) - tp.state = state; + if (tp.state != QEventPoint::Pressed) + tp.state = QEventPoint::State(state); - tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1; + tp.pressure = tp.state == QEventPoint::Released ? 0 : 1; } bool QWaylandInputDevice::Touch::allTouchPointsReleased() { for (const auto &tp : qAsConst(mPendingTouchPoints)) { - if (tp.state != Qt::TouchPointReleased) + if (tp.state != QEventPoint::Released) return false; } return true; @@ -1449,7 +1449,7 @@ void QWaylandInputDevice::Touch::releasePoints() return; for (QWindowSystemInterface::TouchPoint &tp : mPendingTouchPoints) - tp.state = Qt::TouchPointReleased; + tp.state = QEventPoint::Released; touch_frame(); } @@ -1467,7 +1467,7 @@ void QWaylandInputDevice::Touch::touch_frame() QMargins margins = window->frameMargins(); QPoint p = tp.area.center().toPoint(); QPointF localPos(window->mapFromGlobal(QPoint(p.x() + margins.left(), p.y() + margins.top()))); - if (mFocus->touchDragDecoration(mParent, localPos, tp.area.center(), tp.state, mParent->modifiers())) + if (mFocus->touchDragDecoration(mParent, localPos, tp.area.center(), Qt::TouchPointState(tp.state), mParent->modifiers())) return; } @@ -1478,9 +1478,9 @@ void QWaylandInputDevice::Touch::touch_frame() mPendingTouchPoints.clear(); for (const auto &prevPoint: prevTouchPoints) { // All non-released touch points should be part of the next touch event - if (prevPoint.state != Qt::TouchPointReleased) { + if (prevPoint.state != QEventPoint::Released) { QWindowSystemInterface::TouchPoint tp = prevPoint; - tp.state = Qt::TouchPointStationary; // ... as stationary (unless proven otherwise) + tp.state = QEventPoint::Stationary; // ... as stationary (unless proven otherwise) mPendingTouchPoints.append(tp); } } diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h index 8e2dd184b..31bd30088 100644 --- a/src/client/qwaylandinputdevice_p.h +++ b/src/client/qwaylandinputdevice_p.h @@ -65,7 +65,7 @@ #include <QtWaylandClient/private/qwayland-wayland.h> #if QT_CONFIG(xkbcommon) -#include <QtXkbCommonSupport/private/qxkbcommon_p.h> +#include <QtGui/private/qxkbcommon_p.h> #endif #include <QtCore/QDebug> diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index 3d0631c37..0aa18f098 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -89,11 +89,11 @@ #include "qwaylandinputdeviceintegrationfactory_p.h" #if QT_CONFIG(accessibility_atspi_bridge) -#include <QtLinuxAccessibilitySupport/private/bridge_p.h> +#include <QtGui/private/qspiaccessiblebridge_p.h> #endif #if QT_CONFIG(xkbcommon) -#include <QtXkbCommonSupport/private/qxkbcommon_p.h> +#include <QtGui/private/qxkbcommon_p.h> #endif #if QT_CONFIG(vulkan) diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp index bf54a1a00..da7885477 100644 --- a/src/client/qwaylandnativeinterface.cpp +++ b/src/client/qwaylandnativeinterface.cpp @@ -55,7 +55,7 @@ #include <QtWaylandClient/private/qwaylandvulkanwindow_p.h> #endif -#include <QtPlatformHeaders/qwaylandwindowfunctions.h> +#include <QtPlatformHeaders/private/qwaylandwindowfunctions_p.h> QT_BEGIN_NAMESPACE diff --git a/src/client/qwaylandtouch.cpp b/src/client/qwaylandtouch.cpp index 06fa822a3..6c7239034 100644 --- a/src/client/qwaylandtouch.cpp +++ b/src/client/qwaylandtouch.cpp @@ -101,13 +101,12 @@ void QWaylandTouchExtension::touch_extension_touch(uint32_t time, QWindowSystemInterface::TouchPoint tp; tp.id = id; - tp.state = Qt::TouchPointState(int(state & 0xFFFF)); + tp.state = QEventPoint::State(int(state & 0xFFFF)); int sentPointCount = state >> 16; if (!mPointsLeft) { Q_ASSERT(sentPointCount > 0); mPointsLeft = sentPointCount; } - tp.flags = QTouchEvent::TouchPoint::InfoFlags(int(flags & 0xFFFF)); if (!mTouchDevice) registerDevice(flags >> 16); @@ -146,7 +145,7 @@ void QWaylandTouchExtension::sendTouchEvent() // Copy all points, that are in the previous but not in the current list, as stationary. for (int i = 0; i < mPrevTouchPoints.count(); ++i) { const QWindowSystemInterface::TouchPoint &prevPoint(mPrevTouchPoints.at(i)); - if (prevPoint.state == Qt::TouchPointReleased) + if (prevPoint.state == QEventPoint::Released) continue; bool found = false; for (int j = 0; j < mTouchPoints.count(); ++j) @@ -156,7 +155,7 @@ void QWaylandTouchExtension::sendTouchEvent() } if (!found) { QWindowSystemInterface::TouchPoint p = prevPoint; - p.state = Qt::TouchPointStationary; + p.state = QEventPoint::Stationary; mTouchPoints.append(p); } } @@ -168,7 +167,7 @@ void QWaylandTouchExtension::sendTouchEvent() QWindowSystemInterface::handleTouchEvent(mTargetWindow, mTimestamp, mTouchDevice, mTouchPoints); - Qt::TouchPointStates states = {}; + QEventPoint::States states = {}; for (int i = 0; i < mTouchPoints.count(); ++i) states |= mTouchPoints.at(i).state; @@ -179,7 +178,7 @@ void QWaylandTouchExtension::sendTouchEvent() for (int i = 0; i < mTouchPoints.count(); ++i) { const QWindowSystemInterface::TouchPoint &tp(mTouchPoints.at(i)); if (tp.id == mMouseSourceId) { - const bool released = tp.state == Qt::TouchPointReleased; + const bool released = tp.state == QEventPoint::Released; Qt::MouseButtons buttons = released ? Qt::NoButton : Qt::LeftButton; QEvent::Type eventType = firstPress ? QEvent::MouseButtonPress : released ? QEvent::MouseButtonRelease |