diff --git a/qt5-qtwayland.spec b/qt5-qtwayland.spec index 6101dc5..fc36931 100644 --- a/qt5-qtwayland.spec +++ b/qt5-qtwayland.spec @@ -3,7 +3,7 @@ Summary: Qt5 - Wayland platform support and QtCompositor module Name: qt5-%{qt_module} Version: 5.15.5 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv3 Url: http://www.qt.io @@ -62,8 +62,8 @@ Patch50: 0050-Client-set-constraint-adjustments-for-popups-in-xdg.patch Patch100: 0100-Keep-toplevel-windows-in-the-top-left-corner-of-the-screen.patch # Disable for now, there is a Qt bug making this broken -# Patch102: qtwayland-decoration-support-backports-from-qt6.patch -Patch103: qtwayland-client-expose-toplevel-window-state.patch +Patch102: qtwayland-decoration-support-backports-from-qt6.patch +# Patch103: qtwayland-client-expose-toplevel-window-state.patch # Upstreamable patches @@ -172,6 +172,9 @@ popd %changelog +* Thu Aug 25 2022 Jan Grulich - 5.15.5-4 +- Re-enable CSD backports from Qt6 (will be used by QGnomePlatform) + * Sat Jul 23 2022 Fedora Release Engineering - 5.15.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/qtwayland-decoration-support-backports-from-qt6.patch b/qtwayland-decoration-support-backports-from-qt6.patch index fa8ae9e..56e2ea6 100644 --- a/qtwayland-decoration-support-backports-from-qt6.patch +++ b/qtwayland-decoration-support-backports-from-qt6.patch @@ -1,5 +1,5 @@ diff --git a/src/client/qwaylandabstractdecoration_p.h b/src/client/qwaylandabstractdecoration_p.h -index 81c8e177..61cbde77 100644 +index 81c8e17..61cbde7 100644 --- a/src/client/qwaylandabstractdecoration_p.h +++ b/src/client/qwaylandabstractdecoration_p.h @@ -82,6 +82,12 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandAbstractDecoration : public QObject @@ -26,10 +26,10 @@ index 81c8e177..61cbde77 100644 const QImage &contentImage(); diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index bd70f4af..0e819235 100644 +index ec232cd..54b27f1 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp -@@ -380,6 +380,16 @@ void QWaylandWindow::setGeometry(const QRect &rect) +@@ -383,6 +383,16 @@ void QWaylandWindow::setGeometry(const QRect &r) void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset) { QMargins margins = frameMargins(); @@ -46,7 +46,7 @@ index bd70f4af..0e819235 100644 int widthWithoutMargins = qMax(sizeWithMargins.width() - (margins.left() + margins.right()), 1); int heightWithoutMargins = qMax(sizeWithMargins.height() - (margins.top() + margins.bottom()), 1); QRect geometry(windowGeometry().topLeft(), QSize(widthWithoutMargins, heightWithoutMargins)); -@@ -690,7 +700,12 @@ QSize QWaylandWindow::surfaceSize() const +@@ -710,7 +720,12 @@ QSize QWaylandWindow::surfaceSize() const */ QRect QWaylandWindow::windowContentGeometry() const { @@ -60,8 +60,8 @@ index bd70f4af..0e819235 100644 } /*! -@@ -1079,6 +1094,21 @@ bool QWaylandWindow::setMouseGrabEnabled(bool grab) - return true; +@@ -1111,6 +1126,16 @@ Qt::WindowStates QWaylandWindow::windowStates() const + return mLastReportedWindowStates; } +QWaylandWindow::ToplevelWindowTilingStates QWaylandWindow::toplevelWindowTilingStates() const @@ -73,17 +73,12 @@ index bd70f4af..0e819235 100644 +{ + mLastReportedToplevelWindowTilingStates = states; +} -+ -+Qt::WindowStates QWaylandWindow::windowStates() const -+{ -+ return mLastReportedWindowStates; -+} + void QWaylandWindow::handleWindowStatesChanged(Qt::WindowStates states) { createDecoration(); diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h -index 6cc1664b..93ba0623 100644 +index 1907f10..33a3b83 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -95,6 +95,15 @@ public: @@ -102,18 +97,17 @@ index 6cc1664b..93ba0623 100644 QWaylandWindow(QWindow *window, QWaylandDisplay *display); ~QWaylandWindow() override; -@@ -145,6 +154,10 @@ public: +@@ -148,6 +157,9 @@ public: void handleContentOrientationChange(Qt::ScreenOrientation orientation) override; void setOrientationMask(Qt::ScreenOrientations mask); + ToplevelWindowTilingStates toplevelWindowTilingStates() const; + void handleToplevelWindowTilingStatesChanged(ToplevelWindowTilingStates states); + -+ Qt::WindowStates windowStates() const; void setWindowState(Qt::WindowStates states) override; void setWindowFlags(Qt::WindowFlags flags) override; void handleWindowStatesChanged(Qt::WindowStates states); -@@ -256,6 +269,7 @@ protected: +@@ -260,6 +272,7 @@ protected: QRegion mMask; QRegion mOpaqueArea; Qt::WindowStates mLastReportedWindowStates = Qt::WindowNoState; @@ -121,7 +115,7 @@ index 6cc1664b..93ba0623 100644 QWaylandShmBackingStore *mBackingStore = nullptr; QWaylandBuffer *mQueuedBuffer = nullptr; -@@ -292,6 +306,8 @@ private: +@@ -296,6 +309,8 @@ private: friend class QWaylandSubSurface; }; @@ -131,7 +125,7 @@ index 6cc1664b..93ba0623 100644 { return mWindowIcon; diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp -index e75fda3c..72dda67f 100644 +index e75fda3..72dda67 100644 --- a/src/plugins/decorations/bradient/main.cpp +++ b/src/plugins/decorations/bradient/main.cpp @@ -72,7 +72,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandBradientDecoration : public QWaylandAbstra @@ -157,18 +151,18 @@ index e75fda3c..72dda67f 100644 } diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -index 7d33dabd..cf7eb4e9 100644 +index 2666df2..8d8ac85 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -@@ -94,6 +94,7 @@ void QWaylandXdgSurface::Toplevel::applyConfigure() - // TODO: none of the other plugins send WindowActive either, but is it on purpose? - Qt::WindowStates statesWithoutActive = m_pending.states & ~Qt::WindowActive; +@@ -88,6 +88,7 @@ void QWaylandXdgSurface::Toplevel::applyConfigure() + && !m_xdgSurface->m_window->display()->isKeyboardAvailable()) + m_xdgSurface->m_window->display()->handleWindowDeactivated(m_xdgSurface->m_window); + m_xdgSurface->m_window->handleToplevelWindowTilingStatesChanged(m_toplevelStates); - m_xdgSurface->m_window->handleWindowStatesChanged(statesWithoutActive); + m_xdgSurface->m_window->handleWindowStatesChanged(m_pending.states); if (m_pending.size.isEmpty()) { -@@ -126,6 +127,7 @@ void QWaylandXdgSurface::Toplevel::xdg_toplevel_configure(int32_t width, int32_t +@@ -120,6 +121,7 @@ void QWaylandXdgSurface::Toplevel::xdg_toplevel_configure(int32_t width, int32_t size_t numStates = states->size / sizeof(uint32_t); m_pending.states = Qt::WindowNoState; @@ -176,7 +170,7 @@ index 7d33dabd..cf7eb4e9 100644 for (size_t i = 0; i < numStates; i++) { switch (xdgStates[i]) { -@@ -138,6 +140,18 @@ void QWaylandXdgSurface::Toplevel::xdg_toplevel_configure(int32_t width, int32_t +@@ -132,6 +134,18 @@ void QWaylandXdgSurface::Toplevel::xdg_toplevel_configure(int32_t width, int32_t case XDG_TOPLEVEL_STATE_FULLSCREEN: m_pending.states |= Qt::WindowFullScreen; break; @@ -195,7 +189,7 @@ index 7d33dabd..cf7eb4e9 100644 default: break; } -@@ -457,7 +471,7 @@ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) +@@ -458,7 +472,7 @@ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) } QWaylandXdgShell::QWaylandXdgShell(QWaylandDisplay *display, uint32_t id, uint32_t availableVersion) @@ -205,7 +199,7 @@ index 7d33dabd..cf7eb4e9 100644 { display->addRegistryListener(&QWaylandXdgShell::handleRegistryGlobal, this); diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h -index 0c98be35..d7912132 100644 +index 0c98be3..d791213 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h @@ -58,6 +58,7 @@