diff --git a/src/plugins/platforms/wayland/.prev_CMakeLists.txt b/src/plugins/platforms/wayland/.prev_CMakeLists.txt index 5b1a73e5a1e..ac323a56f3f 100644 --- a/src/plugins/platforms/wayland/.prev_CMakeLists.txt +++ b/src/plugins/platforms/wayland/.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/plugins/platforms/wayland/CMakeLists.txt b/src/plugins/platforms/wayland/CMakeLists.txt index 362b721beff..b49a72920d4 100644 --- a/src/plugins/platforms/wayland/CMakeLists.txt +++ b/src/plugins/platforms/wayland/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/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index bdcf4256127..38b129e9edb 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/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/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/CMakeLists.txt b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/CMakeLists.txt index f264dfbe937..5cf358b006c 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/CMakeLists.txt +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/CMakeLists.txt @@ -18,7 +18,6 @@ qt_internal_add_plugin(QWaylandBrcmEglClientBufferPlugin ${CMAKE_DL_LIBS} EGL::EGL Qt::Core - Qt::EglSupportPrivate Qt::Gui Qt::WaylandClientPrivate Wayland::Client diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/.prev_CMakeLists.txt b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/.prev_CMakeLists.txt new file mode 100644 index 00000000000..b1732b014b4 --- /dev/null +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/.prev_CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from wayland-egl.pro. + +##################################################################### +## QWaylandEglClientBufferPlugin Plugin: +##################################################################### + +qt_internal_add_plugin(QWaylandEglClientBufferPlugin + OUTPUT_NAME qt-plugin-wayland-egl + TYPE wayland-graphics-integration-client + SOURCES + ../../../../hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp ../../../../hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h + ../../../../hardwareintegration/client/wayland-egl/qwaylandeglinclude.h + ../../../../hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp ../../../../hardwareintegration/client/wayland-egl/qwaylandeglwindow.h + ../../../../hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp ../../../../hardwareintegration/client/wayland-egl/qwaylandglcontext.h + main.cpp + INCLUDE_DIRECTORIES + ../../../../hardwareintegration/client/wayland-egl + PUBLIC_LIBRARIES + ${CMAKE_DL_LIBS} + EGL::EGL + Qt::Core + Qt::Gui + Qt::OpenGLPrivate + Qt::WaylandClientPrivate + Wayland::Client + Wayland::Egl +) + +#### Keys ignored in scope 1:.:.:wayland-egl.pro:: +# OTHER_FILES = "wayland-egl.json" diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt index b7e274170fd..1742f1173a8 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt @@ -3,6 +3,7 @@ ##################################################################### ## QWaylandEglClientBufferPlugin Plugin: ##################################################################### +qt_find_package(EGL) # special case qt_internal_add_plugin(QWaylandEglClientBufferPlugin OUTPUT_NAME qt-plugin-wayland-egl @@ -16,9 +17,9 @@ qt_internal_add_plugin(QWaylandEglClientBufferPlugin INCLUDE_DIRECTORIES ../../../../hardwareintegration/client/wayland-egl PUBLIC_LIBRARIES + ${CMAKE_DL_LIBS} EGL::EGL Qt::Core - Qt::EglSupportPrivate Qt::Gui Qt::OpenGLPrivate Qt::WaylandClientPrivate diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/.prev_CMakeLists.txt b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/.prev_CMakeLists.txt new file mode 100644 index 00000000000..f575d44e935 --- /dev/null +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/.prev_CMakeLists.txt @@ -0,0 +1,36 @@ +# Generated from xcomposite-egl.pro. + +##################################################################### +## QWaylandXCompositeEglClientBufferPlugin Plugin: +##################################################################### + +qt_internal_add_plugin(QWaylandXCompositeEglClientBufferPlugin + OUTPUT_NAME xcomposite-egl + TYPE wayland-graphics-integration-client + SOURCES + ../../../../hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp ../../../../hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h + ../../../../hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp ../../../../hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h + ../../../../hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp ../../../../hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h + ../../../../hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp ../../../../hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h + main.cpp + INCLUDE_DIRECTORIES + ../../../../hardwareintegration/client/xcomposite-egl + ../../../../hardwareintegration/client/xcomposite_share + PUBLIC_LIBRARIES + EGL::EGL + PkgConfig::XComposite + Qt::Core + Qt::Gui + Qt::WaylandClientPrivate + Wayland::Client + X11::X11 +) + +qt6_generate_wayland_protocol_client_sources(QWaylandXCompositeEglClientBufferPlugin + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/../../../../hardwareintegration/client/xcomposite_share/../../../extensions/xcomposite.xml +) + +#### Keys ignored in scope 1:.:.:xcomposite-egl.pro:: +# OTHER_FILES = "xcomposite-egl.json" +# QMAKE_CXXFLAGS_WARN_ON = "--Wcast-qual" diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/CMakeLists.txt b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/CMakeLists.txt index 6ed42e74fa0..9b7324ccd74 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/CMakeLists.txt +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/CMakeLists.txt @@ -3,6 +3,7 @@ ##################################################################### ## QWaylandXCompositeEglClientBufferPlugin Plugin: ##################################################################### +qt_find_package(EGL) # special case qt_internal_add_plugin(QWaylandXCompositeEglClientBufferPlugin OUTPUT_NAME xcomposite-egl @@ -20,7 +21,6 @@ qt_internal_add_plugin(QWaylandXCompositeEglClientBufferPlugin EGL::EGL PkgConfig::XComposite Qt::Core - Qt::EglSupportPrivate Qt::Gui Qt::WaylandClientPrivate Wayland::Client diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/CMakeLists.txt b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/CMakeLists.txt index 54c18d0ed9a..0f0ea0733b2 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/CMakeLists.txt +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/CMakeLists.txt @@ -20,7 +20,6 @@ qt_internal_add_plugin(QWaylandXCompositeGlxClientBufferPlugin ${CMAKE_DL_LIBS} PkgConfig::XComposite Qt::Core - Qt::GlxSupportPrivate Qt::Gui Qt::WaylandClientPrivate Wayland::Client diff --git a/src/plugins/platforms/wayland/qwaylanddisplay_p.h b/src/plugins/platforms/wayland/qwaylanddisplay_p.h index 818b5ba9048..d386c66ac68 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay_p.h +++ b/src/plugins/platforms/wayland/qwaylanddisplay_p.h @@ -66,7 +66,7 @@ #include #if QT_CONFIG(xkbcommon) -#include +#include #endif struct wl_cursor_image; diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index af9458b44f9..e86274276f0 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/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/plugins/platforms/wayland/qwaylandinputdevice_p.h b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h index 8e2dd184bdd..31bd3008849 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h +++ b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h @@ -65,7 +65,7 @@ #include #if QT_CONFIG(xkbcommon) -#include +#include #endif #include diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 3d0631c37b9..0aa18f09825 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -89,11 +89,11 @@ #include "qwaylandinputdeviceintegrationfactory_p.h" #if QT_CONFIG(accessibility_atspi_bridge) -#include +#include #endif #if QT_CONFIG(xkbcommon) -#include +#include #endif #if QT_CONFIG(vulkan) diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp index bf54a1a00f9..da788547789 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp @@ -55,7 +55,7 @@ #include #endif -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandtouch.cpp b/src/plugins/platforms/wayland/qwaylandtouch.cpp index 06fa822a3d9..6c723903451 100644 --- a/src/plugins/platforms/wayland/qwaylandtouch.cpp +++ b/src/plugins/platforms/wayland/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 diff --git a/tests/auto/wayland/seatv5/tst_seatv5.cpp b/tests/auto/wayland/seatv5/tst_seatv5.cpp index a4d4fe4dd48..701c5ede9d9 100644 --- a/tests/auto/wayland/seatv5/tst_seatv5.cpp +++ b/tests/auto/wayland/seatv5/tst_seatv5.cpp @@ -398,7 +398,7 @@ public: { } QEvent::Type type{}; - Qt::TouchPointStates touchPointStates{}; + QEventPoint::States touchPointStates{}; QList touchPoints; }; QList m_events; diff --git a/tests/auto/wayland/tabletv2/tst_tabletv2.cpp b/tests/auto/wayland/tabletv2/tst_tabletv2.cpp index f52db64f497..3e68e5d1e00 100644 --- a/tests/auto/wayland/tabletv2/tst_tabletv2.cpp +++ b/tests/auto/wayland/tabletv2/tst_tabletv2.cpp @@ -465,11 +465,11 @@ protected: case QEvent::TabletEnterProximity: case QEvent::TabletLeaveProximity: { auto *e = static_cast(event); - auto *ev = new QTabletEvent(e->type(), e->position(), e->globalPosition(), int(e->deviceType()), - int(e->pointerType()), e->pressure(), e->xTilt(), e->yTilt(), - e->tangentialPressure(), e->rotation(), e->z(), - Qt::KeyboardModifier::NoModifier, e->uniqueId(), - e->button(), e->buttons()); + auto *ev = new QTabletEvent(e->type(), e->pointingDevice(), e->position(), e->globalPosition(), + e->pressure(), e->xTilt(), e->yTilt(), + e->tangentialPressure(), e->rotation(), e->z(), + Qt::KeyboardModifier::NoModifier, + e->button(), e->buttons()); m_events << ev; break; } @@ -600,11 +600,11 @@ public: void tabletEvent(QTabletEvent *e) override { - m_events << new QTabletEvent(e->type(), e->position(), e->globalPosition(), int(e->deviceType()), - int(e->pointerType()), e->pressure(), e->xTilt(), e->yTilt(), + m_events << new QTabletEvent(e->type(), e->pointingDevice(), e->position(), e->globalPosition(), + e->pressure(), e->xTilt(), e->yTilt(), e->tangentialPressure(), e->rotation(), e->z(), - Qt::KeyboardModifier::NoModifier, e->uniqueId(), e->button(), - e->buttons()); + Qt::KeyboardModifier::NoModifier, + e->button(), e->buttons()); emit tabletEventReceived(m_events.last()); } int nextEventIndex = 0;