From e8b212d36d1aaa063391a2fcd897210e51cff9e6 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 17 May 2022 10:02:19 +0200 Subject: [PATCH] 5.15.4 --- .gitignore | 1 + ...an-output-after-receiving-more-compl.patch | 6 +- ...-_exit-instead-of-qFatal-for-wayland.patch | 38 --- ...ue-with-repeated-window-size-changes.patch | 6 +- ...slate-opaque-area-with-frame-margins.patch | 40 --- ...seEvent-to-parent-on-subsurface-posi.patch | 97 ------- ...lude-locale.h-for-setlocale-LC_CTYPE.patch | 6 +- ...rags-being-accepted-to-updating-the-.patch | 6 +- ...et-correct-decoration-margins-region.patch | 39 --- ...ect-registry-listener-on-destruction.patch | 6 +- ...e-compositor-the-screen-we-re-expect.patch | 41 --- ...ell-size-hints-before-the-first-comm.patch | 6 +- ...ylandInputContext-to-accept-composed.patch | 257 ------------------ 0013-Fix-build.patch => 0007-Fix-build.patch | 6 +- ...er.patch => 0008-Fix-remove-listener.patch | 6 +- ...> 0009-Hook-up-queryKeyboardModifers.patch | 6 +- ...the-mask-if-we-do-not-have-a-surface.patch | 6 +- ...-if-image-format-is-supported-by-QIm.patch | 6 +- ...ix-crash-when-windows-are-shown-hidd.patch | 6 +- ...on-t-always-recreate-frame-callbacks.patch | 6 +- ...stroy-frame-callback-in-the-actual-c.patch | 6 +- ...r-decoding-modifiers-map-in-Wayland-.patch | 6 +- ...se-wl_keyboard-to-determine-active-s.patch | 6 +- ...pty-clipboard-when-a-new-popup-windo.patch | 8 +- ...eedit-cursor-when-cursor-equals-to-0.patch | 6 +- ...> 0019-Client-Implement-DataDeviceV3.patch | 6 +- ...etion-of-QDrag-object-until-after-we.patch | 6 +- ...cessing-of-events-when-showing-windo.patch | 6 +- ...e-registry_global-out-of-constructor.patch | 6 +- ...ct-flushRequest-after-forceRoundTrip.patch | 6 +- ...-socket-polling-to-a-separate-event-.patch | 6 +- ...ointer-for-null-before-use-in-ASSERT.patch | 6 +- ...corations-when-the-shellSurface-is-n.patch | 6 +- ...ace.damage_buffer-on-the-client-side.patch | 6 +- ...-input-method-module-could-be-loaded.patch | 6 +- ...ent-Remove-mWaitingForUpdateDelivery.patch | 6 +- ...ition-0-should-still-show-the-cursor.patch | 6 +- ...1-Update-the-preedit-styling-mapping.patch | 6 +- ...-client-Simplify-round-trip-behavior.patch | 6 +- ...0033-Client-Fix-opaque-region-setter.patch | 6 +- ...proper-dependencies-in-compile-tests.patch | 6 +- ...utton-state-and-etc-in-pointer_leave.patch | 8 +- ...ent-Remove-mWaitingForUpdateDelivery.patch | 6 +- ...ndition-on-mWaitingForUpdateDelivery.patch | 6 +- ...e-poll-2-when-reading-from-clipboard.patch | 6 +- ...traint-adjustments-for-popups-in-xdg.patch | 33 +++ qt5-qtwayland.spec | 93 ++++--- ...-client-expose-toplevel-window-state.patch | 166 ----------- ...ecoration-support-backports-from-qt6.patch | 234 ---------------- sources | 2 +- 50 files changed, 197 insertions(+), 1076 deletions(-) rename 0007-Client-Announce-an-output-after-receiving-more-compl.patch => 0001-Client-Announce-an-output-after-receiving-more-compl.patch (97%) delete mode 100644 0001-Use-qWarning-and-_exit-instead-of-qFatal-for-wayland.patch rename 0008-Fix-issue-with-repeated-window-size-changes.patch => 0002-Fix-issue-with-repeated-window-size-changes.patch (95%) delete mode 100644 0002-Translate-opaque-area-with-frame-margins.patch delete mode 100644 0003-Client-Send-exposeEvent-to-parent-on-subsurface-posi.patch rename 0009-Include-locale.h-for-setlocale-LC_CTYPE.patch => 0003-Include-locale.h-for-setlocale-LC_CTYPE.patch (85%) rename 0010-Client-Connect-drags-being-accepted-to-updating-the-.patch => 0004-Client-Connect-drags-being-accepted-to-updating-the-.patch (92%) delete mode 100644 0004-Get-correct-decoration-margins-region.patch rename 0011-Client-Disconnect-registry-listener-on-destruction.patch => 0005-Client-Disconnect-registry-listener-on-destruction.patch (93%) delete mode 100644 0005-xdgshell-Tell-the-compositor-the-screen-we-re-expect.patch rename 0012-Client-Set-XdgShell-size-hints-before-the-first-comm.patch => 0006-Client-Set-XdgShell-size-hints-before-the-first-comm.patch (94%) delete mode 100644 0006-client-Allow-QWaylandInputContext-to-accept-composed.patch rename 0013-Fix-build.patch => 0007-Fix-build.patch (94%) rename 0014-Fix-remove-listener.patch => 0008-Fix-remove-listener.patch (91%) rename 0015-Hook-up-queryKeyboardModifers.patch => 0009-Hook-up-queryKeyboardModifers.patch (93%) rename 0016-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch => 0010-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch (89%) rename 0017-Correctly-detect-if-image-format-is-supported-by-QIm.patch => 0011-Correctly-detect-if-image-format-is-supported-by-QIm.patch (95%) rename 0018-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch => 0012-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch (88%) rename 0019-Client-Don-t-always-recreate-frame-callbacks.patch => 0013-Client-Don-t-always-recreate-frame-callbacks.patch (96%) rename 0020-Client-Always-destroy-frame-callback-in-the-actual-c.patch => 0014-Client-Always-destroy-frame-callback-in-the-actual-c.patch (93%) rename 0021-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch => 0015-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch (90%) rename 0022-Wayland-client-use-wl_keyboard-to-determine-active-s.patch => 0016-Wayland-client-use-wl_keyboard-to-determine-active-s.patch (99%) rename 0023-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch => 0017-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch (93%) rename 0024-Set-preedit-cursor-when-cursor-equals-to-0.patch => 0018-Set-preedit-cursor-when-cursor-equals-to-0.patch (89%) rename 0025-Client-Implement-DataDeviceV3.patch => 0019-Client-Implement-DataDeviceV3.patch (99%) rename 0026-Client-Delay-deletion-of-QDrag-object-until-after-we.patch => 0020-Client-Delay-deletion-of-QDrag-object-until-after-we.patch (93%) rename 0027-Client-Avoid-processing-of-events-when-showing-windo.patch => 0021-Client-Avoid-processing-of-events-when-showing-windo.patch (91%) rename 0028-Handle-registry_global-out-of-constructor.patch => 0022-Handle-registry_global-out-of-constructor.patch (95%) rename 0029-Connect-flushRequest-after-forceRoundTrip.patch => 0023-Connect-flushRequest-after-forceRoundTrip.patch (94%) rename 0030-Move-the-wayland-socket-polling-to-a-separate-event-.patch => 0024-Move-the-wayland-socket-polling-to-a-separate-event-.patch (99%) rename 0031-Check-pointer-for-null-before-use-in-ASSERT.patch => 0025-Check-pointer-for-null-before-use-in-ASSERT.patch (86%) rename 0032-Do-not-create-decorations-when-the-shellSurface-is-n.patch => 0026-Do-not-create-decorations-when-the-shellSurface-is-n.patch (89%) rename 0033-Use-wl_surface.damage_buffer-on-the-client-side.patch => 0027-Use-wl_surface.damage_buffer-on-the-client-side.patch (97%) rename 0034-Fix-crash-if-no-input-method-module-could-be-loaded.patch => 0028-Fix-crash-if-no-input-method-module-could-be-loaded.patch (88%) rename 0035-Client-Remove-mWaitingForUpdateDelivery.patch => 0029-Client-Remove-mWaitingForUpdateDelivery.patch (96%) rename 0036-Cursor-position-0-should-still-show-the-cursor.patch => 0030-Cursor-position-0-should-still-show-the-cursor.patch (90%) rename 0037-Update-the-preedit-styling-mapping.patch => 0031-Update-the-preedit-styling-mapping.patch (96%) rename 0038-client-Simplify-round-trip-behavior.patch => 0032-client-Simplify-round-trip-behavior.patch (95%) rename 0039-Client-Fix-opaque-region-setter.patch => 0033-Client-Fix-opaque-region-setter.patch (89%) rename 0040-Use-proper-dependencies-in-compile-tests.patch => 0034-Use-proper-dependencies-in-compile-tests.patch (96%) rename 0041-client-update-button-state-and-etc-in-pointer_leave.patch => 0035-client-update-button-state-and-etc-in-pointer_leave.patch (89%) rename 0042-Revert-Client-Remove-mWaitingForUpdateDelivery.patch => 0036-Revert-Client-Remove-mWaitingForUpdateDelivery.patch (94%) rename 0043-Fix-race-condition-on-mWaitingForUpdateDelivery.patch => 0037-Fix-race-condition-on-mWaitingForUpdateDelivery.patch (94%) rename 0044-use-poll-2-when-reading-from-clipboard.patch => 0038-use-poll-2-when-reading-from-clipboard.patch (92%) create mode 100644 0050-Client-set-constraint-adjustments-for-popups-in-xdg.patch delete mode 100644 qtwayland-client-expose-toplevel-window-state.patch delete mode 100644 qtwayland-decoration-support-backports-from-qt6.patch diff --git a/.gitignore b/.gitignore index 144a4ed..5d6e9c9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /qtwayland-everywhere-src-5.15.1.tar.xz /qtwayland-everywhere-src-5.15.2.tar.xz /qtwayland-everywhere-opensource-src-5.15.3.tar.xz +/qtwayland-everywhere-opensource-src-5.15.4.tar.xz diff --git a/0007-Client-Announce-an-output-after-receiving-more-compl.patch b/0001-Client-Announce-an-output-after-receiving-more-compl.patch similarity index 97% rename from 0007-Client-Announce-an-output-after-receiving-more-compl.patch rename to 0001-Client-Announce-an-output-after-receiving-more-compl.patch index 8eaaa51..c05ea8d 100644 --- a/0007-Client-Announce-an-output-after-receiving-more-compl.patch +++ b/0001-Client-Announce-an-output-after-receiving-more-compl.patch @@ -1,7 +1,7 @@ -From a6fb2a976ecd778e450afe89c180c8c748beb568 Mon Sep 17 00:00:00 2001 +From eca0516905c3f88aba876d18742c9102da2319db Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 5 May 2021 20:49:26 +0300 -Subject: [PATCH 07/44] Client: Announce an output after receiving more +Subject: [PATCH 01/38] Client: Announce an output after receiving more complete state Output initialization is not atomic, meaning that the compositor may @@ -142,5 +142,5 @@ index df1c94f2..050cfdc0 100644 #if QT_CONFIG(cursor) -- -2.35.1 +2.36.1 diff --git a/0001-Use-qWarning-and-_exit-instead-of-qFatal-for-wayland.patch b/0001-Use-qWarning-and-_exit-instead-of-qFatal-for-wayland.patch deleted file mode 100644 index ea4dabb..0000000 --- a/0001-Use-qWarning-and-_exit-instead-of-qFatal-for-wayland.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 610af8f0ba9de42cb22228e4e4b3fd77275e3e17 Mon Sep 17 00:00:00 2001 -From: Weng Xuetian -Date: Tue, 9 Mar 2021 10:43:59 -0800 -Subject: [PATCH 01/44] Use qWarning and _exit() instead of qFatal for wayland - error - -This type of error is likely to happen upon system logout. qFatal would -trigger sigabrt and leave unnecessary coredump on the system. Using -qWarning here would make it consistent with xcb's io error. - -Pick-to: 5.15 6.0 6.1 -Change-Id: I571ba007bf2453486b81837cccdbefa5f181b63d -Reviewed-by: David Edmundson ---- - src/client/qwaylanddisplay.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp -index fe094f6f..f10c1f79 100644 ---- a/src/client/qwaylanddisplay.cpp -+++ b/src/client/qwaylanddisplay.cpp -@@ -206,10 +206,11 @@ void QWaylandDisplay::checkError() const - int ecode = wl_display_get_error(mDisplay); - if ((ecode == EPIPE || ecode == ECONNRESET)) { - // special case this to provide a nicer error -- qFatal("The Wayland connection broke. Did the Wayland compositor die?"); -+ qWarning("The Wayland connection broke. Did the Wayland compositor die?"); - } else { -- qFatal("The Wayland connection experienced a fatal error: %s", strerror(ecode)); -+ qWarning("The Wayland connection experienced a fatal error: %s", strerror(ecode)); - } -+ _exit(1); - } - - void QWaylandDisplay::flushRequests() --- -2.35.1 - diff --git a/0008-Fix-issue-with-repeated-window-size-changes.patch b/0002-Fix-issue-with-repeated-window-size-changes.patch similarity index 95% rename from 0008-Fix-issue-with-repeated-window-size-changes.patch rename to 0002-Fix-issue-with-repeated-window-size-changes.patch index 935883c..41ea577 100644 --- a/0008-Fix-issue-with-repeated-window-size-changes.patch +++ b/0002-Fix-issue-with-repeated-window-size-changes.patch @@ -1,7 +1,7 @@ -From bb9288c913dc49aefc3fad03ec243809b6b21a88 Mon Sep 17 00:00:00 2001 +From 95a139413337bb92a9dbbbd95f61e52cc1f43649 Mon Sep 17 00:00:00 2001 From: Jaeyoon Jung Date: Mon, 15 Feb 2021 08:31:06 +0900 -Subject: [PATCH 08/44] Fix issue with repeated window size changes +Subject: [PATCH 02/38] Fix issue with repeated window size changes Check if the new window size is different from the size requested previously before calling wl_egl_window_resize. It addresses the issue @@ -54,5 +54,5 @@ index 5b1f4d56..0079dfef 100644 } -- -2.35.1 +2.36.1 diff --git a/0002-Translate-opaque-area-with-frame-margins.patch b/0002-Translate-opaque-area-with-frame-margins.patch deleted file mode 100644 index 2540bd5..0000000 --- a/0002-Translate-opaque-area-with-frame-margins.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d353938c1a07a803656489cada8683e31f8f1c62 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Wed, 10 Feb 2021 17:11:27 +0100 -Subject: [PATCH 02/44] Translate opaque area with frame margins - -The opaque area doesn't take window decorations into account, which may -result into possible graphical artefacts. - -Pick-to: 5.15 6.0 6.1 -Change-Id: I1606e8256e7e204dad927931eb1221b576e227fd -Reviewed-by: David Edmundson ---- - src/client/qwaylandwindow.cpp | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index e875af3a..2af39977 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -1234,12 +1234,14 @@ bool QWaylandWindow::isOpaque() const - - void QWaylandWindow::setOpaqueArea(const QRegion &opaqueArea) - { -- if (opaqueArea == mOpaqueArea || !mSurface) -+ const QRegion translatedOpaqueArea = opaqueArea.translated(frameMargins().left(), frameMargins().top()); -+ -+ if (translatedOpaqueArea == mOpaqueArea || !mSurface) - return; - -- mOpaqueArea = opaqueArea; -+ mOpaqueArea = translatedOpaqueArea; - -- struct ::wl_region *region = mDisplay->createRegion(opaqueArea); -+ struct ::wl_region *region = mDisplay->createRegion(translatedOpaqueArea); - mSurface->set_opaque_region(region); - wl_region_destroy(region); - } --- -2.35.1 - diff --git a/0003-Client-Send-exposeEvent-to-parent-on-subsurface-posi.patch b/0003-Client-Send-exposeEvent-to-parent-on-subsurface-posi.patch deleted file mode 100644 index df981db..0000000 --- a/0003-Client-Send-exposeEvent-to-parent-on-subsurface-posi.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 11e9bd41951ec9f229e20566f821aa39ca011352 Mon Sep 17 00:00:00 2001 -From: David Edmundson -Date: Mon, 14 Sep 2020 17:08:39 +0100 -Subject: [PATCH 03/44] Client: Send exposeEvent to parent on subsurface - position changes - -When a subsurface is moved, we need the parent window to commit to apply -that move. Ideally we want this in sync with any potential rendering on -the parent window. - -Currently the code calls requestUpdate() which acts more like a frame -callback; it will only do something if the main QWindow considers itself -dirty. - -We want to force a repaint, which is semantically more similar to an -ExposeEvent. - -Fixes: QTBUG-86177 -Pick-to: 5.15 -Change-Id: I30bdfa357beee860ce2b00a256eaea6d040dd55c -Reviewed-by: Eskil Abrahamsen Blomfeldt ---- - src/client/qwaylandwindow.cpp | 7 ++++- - tests/auto/client/surface/tst_surface.cpp | 33 +++++++++++++++++++---- - 2 files changed, 34 insertions(+), 6 deletions(-) - -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index 2af39977..e96d8fe9 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -342,7 +342,12 @@ void QWaylandWindow::setGeometry_helper(const QRect &rect) - if (mSubSurfaceWindow) { - QMargins m = QPlatformWindow::parent()->frameMargins(); - mSubSurfaceWindow->set_position(rect.x() + m.left(), rect.y() + m.top()); -- mSubSurfaceWindow->parent()->window()->requestUpdate(); -+ -+ QWaylandWindow *parentWindow = mSubSurfaceWindow->parent(); -+ if (parentWindow && parentWindow->isExposed()) { -+ QRect parentExposeGeometry(QPoint(), parentWindow->geometry().size()); -+ parentWindow->sendExposeEvent(parentExposeGeometry); -+ } - } - } - -diff --git a/tests/auto/client/surface/tst_surface.cpp b/tests/auto/client/surface/tst_surface.cpp -index b8a65f15..95e4e609 100644 ---- a/tests/auto/client/surface/tst_surface.cpp -+++ b/tests/auto/client/surface/tst_surface.cpp -@@ -167,17 +167,40 @@ void tst_surface::negotiateShmFormat() - void tst_surface::createSubsurface() - { - QRasterWindow window; -- window.resize(64, 64); -- window.show(); -- QCOMPOSITOR_TRY_VERIFY(xdgToplevel()); -- exec([=] { xdgToplevel()->sendCompleteConfigure(); }); -- QCOMPOSITOR_TRY_VERIFY(xdgSurface()->m_committedConfigureSerial); -+ window.setObjectName("main"); -+ window.resize(200, 200); - - QRasterWindow subWindow; -+ subWindow.setObjectName("subwindow"); - subWindow.setParent(&window); - subWindow.resize(64, 64); -+ -+ window.show(); - subWindow.show(); -+ - QCOMPOSITOR_TRY_VERIFY(subSurface()); -+ QCOMPOSITOR_TRY_VERIFY(xdgToplevel()); -+ exec([=] { xdgToplevel()->sendCompleteConfigure(); }); -+ QCOMPOSITOR_TRY_VERIFY(xdgSurface()->m_committedConfigureSerial); -+ -+ const Surface *mainSurface = exec([=] {return surface(0);}); -+ const Surface *childSurface = exec([=] {return surface(1);}); -+ QSignalSpy mainSurfaceCommitSpy(mainSurface, &Surface::commit); -+ QSignalSpy childSurfaceCommitSpy(childSurface, &Surface::commit); -+ -+ // Move subsurface. The parent should redraw and commit -+ subWindow.setGeometry(100, 100, 64, 64); -+ // the toplevel should commit to indicate the subsurface moved -+ QCOMPOSITOR_TRY_COMPARE(mainSurfaceCommitSpy.count(), 1); -+ mainSurfaceCommitSpy.clear(); -+ childSurfaceCommitSpy.clear(); -+ -+ // Move and resize the subSurface. The parent should redraw and commit -+ // The child should also redraw -+ subWindow.setGeometry(50, 50, 80, 80); -+ QCOMPOSITOR_TRY_COMPARE(mainSurfaceCommitSpy.count(), 1); -+ QCOMPOSITOR_TRY_COMPARE(childSurfaceCommitSpy.count(), 1); -+ - } - - // Used to cause a crash in libwayland (QTBUG-79674) --- -2.35.1 - diff --git a/0009-Include-locale.h-for-setlocale-LC_CTYPE.patch b/0003-Include-locale.h-for-setlocale-LC_CTYPE.patch similarity index 85% rename from 0009-Include-locale.h-for-setlocale-LC_CTYPE.patch rename to 0003-Include-locale.h-for-setlocale-LC_CTYPE.patch index 25a6132..86e6f1a 100644 --- a/0009-Include-locale.h-for-setlocale-LC_CTYPE.patch +++ b/0003-Include-locale.h-for-setlocale-LC_CTYPE.patch @@ -1,7 +1,7 @@ -From 82720c9d7e0a706793f9716144347171820ddf4d Mon Sep 17 00:00:00 2001 +From 4f5bef9e6e0d16bb859e7a99ef5ebfca2ac93f45 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 10 May 2021 14:38:49 +0200 -Subject: [PATCH 09/44] Include locale.h for setlocale/LC_CTYPE +Subject: [PATCH 03/38] Include locale.h for setlocale/LC_CTYPE Pick-to: 5.15 Change-Id: Iced32a31a63cec71008549c1e0961d59ffc45a37 @@ -27,5 +27,5 @@ index ef5aa375..503fd735 100644 Q_LOGGING_CATEGORY(qLcQpaInputMethods, "qt.qpa.input.methods") -- -2.35.1 +2.36.1 diff --git a/0010-Client-Connect-drags-being-accepted-to-updating-the-.patch b/0004-Client-Connect-drags-being-accepted-to-updating-the-.patch similarity index 92% rename from 0010-Client-Connect-drags-being-accepted-to-updating-the-.patch rename to 0004-Client-Connect-drags-being-accepted-to-updating-the-.patch index 678df9e..8977322 100644 --- a/0010-Client-Connect-drags-being-accepted-to-updating-the-.patch +++ b/0004-Client-Connect-drags-being-accepted-to-updating-the-.patch @@ -1,7 +1,7 @@ -From 6b2084a4c9f87d3575fc6aec3f7454304bcc6188 Mon Sep 17 00:00:00 2001 +From 58f7e6cfb61e4f170ab7ced2e01b6222036f934d Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 9 Feb 2021 16:09:21 +0000 -Subject: [PATCH 10/44] Client: Connect drags being accepted to updating the +Subject: [PATCH 04/38] Client: Connect drags being accepted to updating the source drag icon Currently in a multi-process drag and drop when the other client accepts @@ -35,5 +35,5 @@ index 19944a34..54a69c3c 100644 start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial()); return true; -- -2.35.1 +2.36.1 diff --git a/0004-Get-correct-decoration-margins-region.patch b/0004-Get-correct-decoration-margins-region.patch deleted file mode 100644 index c836c79..0000000 --- a/0004-Get-correct-decoration-margins-region.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 50a9256db8cd43665cf74cf94a293d1c05375d33 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Thu, 11 Feb 2021 15:12:32 +0100 -Subject: [PATCH 04/44] Get correct decoration margins region - -Size we use to calculate margins region already contains size including -margins. This resulted into bigger region and not properly damaging -region we need to update. - -Pick-to: 5.15 6.0 6.1 -Change-Id: Id1b7f4cd2a7b894b82db09c5af2b2d1f1f43fa2a -Reviewed-by: David Edmundson ---- - src/client/qwaylandabstractdecoration.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp -index 87dd6cea..b6ee43c9 100644 ---- a/src/client/qwaylandabstractdecoration.cpp -+++ b/src/client/qwaylandabstractdecoration.cpp -@@ -108,11 +108,11 @@ void QWaylandAbstractDecoration::setWaylandWindow(QWaylandWindow *window) - static QRegion marginsRegion(const QSize &size, const QMargins &margins) - { - QRegion r; -- const int widthWithMargins = margins.left() + size.width() + margins.right(); -- r += QRect(0, 0, widthWithMargins, margins.top()); // top -- r += QRect(0, size.height()+margins.top(), widthWithMargins, margins.bottom()); //bottom -+ -+ r += QRect(0, 0, size.width(), margins.top()); // top -+ r += QRect(0, size.height()-margins.bottom(), size.width(), margins.bottom()); //bottom - r += QRect(0, margins.top(), margins.left(), size.height()); //left -- r += QRect(size.width()+margins.left(), margins.top(), margins.right(), size.height()); // right -+ r += QRect(size.width()-margins.left(), margins.top(), margins.right(), size.height()-margins.top()); // right - return r; - } - --- -2.35.1 - diff --git a/0011-Client-Disconnect-registry-listener-on-destruction.patch b/0005-Client-Disconnect-registry-listener-on-destruction.patch similarity index 93% rename from 0011-Client-Disconnect-registry-listener-on-destruction.patch rename to 0005-Client-Disconnect-registry-listener-on-destruction.patch index c16d500..eb15760 100644 --- a/0011-Client-Disconnect-registry-listener-on-destruction.patch +++ b/0005-Client-Disconnect-registry-listener-on-destruction.patch @@ -1,7 +1,7 @@ -From a1d6aa2078b8a840469f13ae720669cb4f99291d Mon Sep 17 00:00:00 2001 +From 0b8b965626c7d02ce885187fa46fe6c69af3ede3 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 14 May 2021 13:23:24 +0100 -Subject: [PATCH 11/44] Client: Disconnect registry listener on destruction +Subject: [PATCH 05/38] Client: Disconnect registry listener on destruction If a display outlives a QWaylandClientExtension and a new global is announced we end up delivering an event to a now deleted extension which @@ -45,5 +45,5 @@ index 98272e57..5bd28398 100644 QtWaylandClient::QWaylandIntegration *integration() const; int version() const; -- -2.35.1 +2.36.1 diff --git a/0005-xdgshell-Tell-the-compositor-the-screen-we-re-expect.patch b/0005-xdgshell-Tell-the-compositor-the-screen-we-re-expect.patch deleted file mode 100644 index d4ae5fb..0000000 --- a/0005-xdgshell-Tell-the-compositor-the-screen-we-re-expect.patch +++ /dev/null @@ -1,41 +0,0 @@ -From f408482e4364293e5ab9889854a759796436971d Mon Sep 17 00:00:00 2001 -From: Aleix Pol -Date: Mon, 23 Nov 2020 20:07:02 +0100 -Subject: [PATCH 05/44] xdgshell: Tell the compositor the screen we're - expecting to fill - -The xdgshell protocol allows us to tell the output to fill. This makes -it possible to use fullscreen confidently on systems with multiple -screens knowing that our windows won't be overlapping one another by -calling setScreen accordingly before QWindow::showFullScreen. - -Pick-to: 6.1 6.0 5.15 -Change-Id: I757854c3698639472f3a25ef298ddcca031e1ed5 -Reviewed-by: David Edmundson ---- - .../shellintegration/xdg-shell/qwaylandxdgshell.cpp | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -index 1c762944..3a1569f7 100644 ---- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -@@ -178,9 +178,12 @@ void QWaylandXdgSurface::Toplevel::requestWindowStates(Qt::WindowStates states) - } - - if (changedStates & Qt::WindowFullScreen) { -- if (states & Qt::WindowFullScreen) -- set_fullscreen(nullptr); -- else -+ if (states & Qt::WindowFullScreen) { -+ auto screen = m_xdgSurface->window()->waylandScreen(); -+ if (screen) { -+ set_fullscreen(screen->output()); -+ } -+ } else - unset_fullscreen(); - } - --- -2.35.1 - diff --git a/0012-Client-Set-XdgShell-size-hints-before-the-first-comm.patch b/0006-Client-Set-XdgShell-size-hints-before-the-first-comm.patch similarity index 94% rename from 0012-Client-Set-XdgShell-size-hints-before-the-first-comm.patch rename to 0006-Client-Set-XdgShell-size-hints-before-the-first-comm.patch index f5e692c..8a2b616 100644 --- a/0012-Client-Set-XdgShell-size-hints-before-the-first-comm.patch +++ b/0006-Client-Set-XdgShell-size-hints-before-the-first-comm.patch @@ -1,7 +1,7 @@ -From d9d7c73f908db351921cf016c5e079f3d13e84aa Mon Sep 17 00:00:00 2001 +From 71de867aab030a9f48bd73e4090d301da75e4102 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 3 May 2021 23:01:53 +0100 -Subject: [PATCH 12/44] Client: Set XdgShell size hints before the first commit +Subject: [PATCH 06/38] Client: Set XdgShell size hints before the first commit propagateSizeHints is only called in QWindow we have platform window and minimumSizeHint is then sent. We also need to send existing hints when @@ -54,5 +54,5 @@ index 2277bbb8..2fdd0a7c 100644 QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.minSize, QSize(100, 100)); QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.maxSize, QSize(1000, 1000)); -- -2.35.1 +2.36.1 diff --git a/0006-client-Allow-QWaylandInputContext-to-accept-composed.patch b/0006-client-Allow-QWaylandInputContext-to-accept-composed.patch deleted file mode 100644 index c94ae9d..0000000 --- a/0006-client-Allow-QWaylandInputContext-to-accept-composed.patch +++ /dev/null @@ -1,257 +0,0 @@ -From d6dd815014564f235fb972eb72d28ccca6cf3549 Mon Sep 17 00:00:00 2001 -From: Aleix Pol -Date: Wed, 10 Mar 2021 01:09:13 +0100 -Subject: [PATCH 06/44] client: Allow QWaylandInputContext to accept composed - key combinations - -At the moment, we are forcing user to choose to either compose or use -the text-input channel. This patch brings some of the QComposeInputContext -functionality in order to let applications understand dead key -combinations like they are supposed to. - -Having it in QWaylandInputContext rather than in QWaylandInputDevice -should solve the problems 3aedd01271dc4f4a13103d632df224971ab2b6df had -with 57c4af2b18c0fb1d266b245a107fa6cb876b9d9e, because we are doing it -in the input context rather than before. This way, if the user is -overriding the input method (e.g. by setting QT_IM_MODULE), all the key -strokes will still be properly forwarded to the module to use. - -This in turn allows us to solve https://bugs.kde.org/show_bug.cgi?id=411729 -and https://bugs.kde.org/show_bug.cgi?id=405388 since we don't need to -choose anymore between physical and virual keyboards anymore. - -Pick-to: 5.15 -Change-Id: I8601f5d7ae21edf4b3a1191fa75877286e505588 -Reviewed-by: David Edmundson ---- - src/client/qwaylanddisplay_p.h | 3 - - src/client/qwaylandinputcontext.cpp | 95 ++++++++++++++++++++++++++++- - src/client/qwaylandinputcontext_p.h | 21 +++++++ - src/client/qwaylandinputdevice.cpp | 2 +- - src/client/qwaylandintegration.cpp | 8 +-- - 5 files changed, 119 insertions(+), 10 deletions(-) - -diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h -index 188e9131..3b092bc8 100644 ---- a/src/client/qwaylanddisplay_p.h -+++ b/src/client/qwaylanddisplay_p.h -@@ -175,8 +175,6 @@ public: - QWaylandHardwareIntegration *hardwareIntegration() const { return mHardwareIntegration.data(); } - QWaylandXdgOutputManagerV1 *xdgOutputManager() const { return mXdgOutputManager.data(); } - -- bool usingInputContextFromCompositor() const { return mUsingInputContextFromCompositor; } -- - struct RegistryGlobal { - uint32_t id; - QString interface; -@@ -282,7 +280,6 @@ private: - QReadWriteLock m_frameQueueLock; - - bool mClientSideInputContextRequested = !QPlatformInputContextFactory::requested().isNull(); -- bool mUsingInputContextFromCompositor = false; - - void registry_global(uint32_t id, const QString &interface, uint32_t version) override; - void registry_global_remove(uint32_t id) override; -diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp -index e9afe05e..ef5aa375 100644 ---- a/src/client/qwaylandinputcontext.cpp -+++ b/src/client/qwaylandinputcontext.cpp -@@ -406,6 +406,8 @@ bool QWaylandInputContext::isValid() const - void QWaylandInputContext::reset() - { - qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO; -+ if (m_composeState) -+ xkb_compose_state_reset(m_composeState); - - QPlatformInputContext::reset(); - -@@ -526,9 +528,14 @@ Qt::LayoutDirection QWaylandInputContext::inputDirection() const - return textInput()->inputDirection(); - } - --void QWaylandInputContext::setFocusObject(QObject *) -+void QWaylandInputContext::setFocusObject(QObject *object) - { - qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO; -+#if QT_CONFIG(xkbcommon) -+ m_focusObject = object; -+#else -+ Q_UNUSED(object); -+#endif - - if (!textInput()) - return; -@@ -561,6 +568,92 @@ QWaylandTextInput *QWaylandInputContext::textInput() const - return mDisplay->defaultInputDevice()->textInput(); - } - -+#if QT_CONFIG(xkbcommon) -+ -+void QWaylandInputContext::ensureInitialized() -+{ -+ if (m_initialized) -+ return; -+ -+ if (!m_XkbContext) { -+ qCWarning(qLcQpaInputMethods) << "error: xkb context has not been set on" << metaObject()->className(); -+ return; -+ } -+ -+ m_initialized = true; -+ const char *locale = setlocale(LC_CTYPE, ""); -+ if (!locale) -+ locale = setlocale(LC_CTYPE, nullptr); -+ qCDebug(qLcQpaInputMethods) << "detected locale (LC_CTYPE):" << locale; -+ -+ m_composeTable = xkb_compose_table_new_from_locale(m_XkbContext, locale, XKB_COMPOSE_COMPILE_NO_FLAGS); -+ if (m_composeTable) -+ m_composeState = xkb_compose_state_new(m_composeTable, XKB_COMPOSE_STATE_NO_FLAGS); -+ -+ if (!m_composeTable) { -+ qCWarning(qLcQpaInputMethods, "failed to create compose table"); -+ return; -+ } -+ if (!m_composeState) { -+ qCWarning(qLcQpaInputMethods, "failed to create compose state"); -+ return; -+ } -+} -+ -+bool QWaylandInputContext::filterEvent(const QEvent *event) -+{ -+ auto keyEvent = static_cast(event); -+ if (keyEvent->type() != QEvent::KeyPress) -+ return false; -+ -+ if (!inputMethodAccepted()) -+ return false; -+ -+ // lazy initialization - we don't want to do this on an app startup -+ ensureInitialized(); -+ -+ if (!m_composeTable || !m_composeState) -+ return false; -+ -+ xkb_compose_state_feed(m_composeState, keyEvent->nativeVirtualKey()); -+ -+ switch (xkb_compose_state_get_status(m_composeState)) { -+ case XKB_COMPOSE_COMPOSING: -+ return true; -+ case XKB_COMPOSE_CANCELLED: -+ reset(); -+ return false; -+ case XKB_COMPOSE_COMPOSED: -+ { -+ const int size = xkb_compose_state_get_utf8(m_composeState, nullptr, 0); -+ QVarLengthArray buffer(size + 1); -+ xkb_compose_state_get_utf8(m_composeState, buffer.data(), buffer.size()); -+ QString composedText = QString::fromUtf8(buffer.constData()); -+ -+ QInputMethodEvent event; -+ event.setCommitString(composedText); -+ -+ if (!m_focusObject && qApp) -+ m_focusObject = qApp->focusObject(); -+ -+ if (m_focusObject) -+ QCoreApplication::sendEvent(m_focusObject, &event); -+ else -+ qCWarning(qLcQpaInputMethods, "no focus object"); -+ -+ reset(); -+ return true; -+ } -+ case XKB_COMPOSE_NOTHING: -+ return false; -+ default: -+ Q_UNREACHABLE(); -+ return false; -+ } -+} -+ -+#endif -+ - } - - QT_END_NAMESPACE -diff --git a/src/client/qwaylandinputcontext_p.h b/src/client/qwaylandinputcontext_p.h -index 10132dfe..50db6344 100644 ---- a/src/client/qwaylandinputcontext_p.h -+++ b/src/client/qwaylandinputcontext_p.h -@@ -61,6 +61,10 @@ - - #include - #include -+#include -+#if QT_CONFIG(xkbcommon) -+#include -+#endif - - struct wl_callback; - struct wl_callback_listener; -@@ -155,11 +159,28 @@ public: - - void setFocusObject(QObject *object) override; - -+#if QT_CONFIG(xkbcommon) -+ bool filterEvent(const QEvent *event) override; -+ -+ // This invokable is called from QXkbCommon::setXkbContext(). -+ Q_INVOKABLE void setXkbContext(struct xkb_context *context) { m_XkbContext = context; } -+#endif -+ - private: - QWaylandTextInput *textInput() const; - - QWaylandDisplay *mDisplay = nullptr; - QPointer mCurrentWindow; -+ -+#if QT_CONFIG(xkbcommon) -+ void ensureInitialized(); -+ -+ bool m_initialized = false; -+ QObject *m_focusObject = nullptr; -+ xkb_compose_table *m_composeTable = nullptr; -+ xkb_compose_state *m_composeState = nullptr; -+ struct xkb_context *m_XkbContext = nullptr; -+#endif - }; - - } -diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp -index ed4a0eb4..ae045f4f 100644 ---- a/src/client/qwaylandinputdevice.cpp -+++ b/src/client/qwaylandinputdevice.cpp -@@ -1201,7 +1201,7 @@ void QWaylandInputDevice::Keyboard::handleKey(ulong timestamp, QEvent::Type type - QPlatformInputContext *inputContext = QGuiApplicationPrivate::platformIntegration()->inputContext(); - bool filtered = false; - -- if (inputContext && !mParent->mQDisplay->usingInputContextFromCompositor()) { -+ if (inputContext) { - QKeyEvent event(type, key, modifiers, nativeScanCode, nativeVirtualKey, - nativeModifiers, text, autorepeat, count); - event.setTimestamp(timestamp); -diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp -index 7ad8e05e..c53ccb78 100644 ---- a/src/client/qwaylandintegration.cpp -+++ b/src/client/qwaylandintegration.cpp -@@ -474,13 +474,11 @@ void QWaylandIntegration::reconfigureInputContext() - - #if QT_CONFIG(xkbcommon) - QXkbCommon::setXkbContext(mInputContext.data(), mDisplay->xkbContext()); -+ if (QWaylandInputContext* waylandInput = qobject_cast(mInputContext.get())) { -+ waylandInput->setXkbContext(mDisplay->xkbContext()); -+ } - #endif - -- // Even if compositor-side input context handling has been requested, we fallback to -- // client-side handling if compositor does not provide the text-input extension. This -- // is why we need to check here which input context actually is being used. -- mDisplay->mUsingInputContextFromCompositor = qobject_cast(mInputContext.data()); -- - qCDebug(lcQpaWayland) << "using input method:" << inputContext()->metaObject()->className(); - } - --- -2.35.1 - diff --git a/0013-Fix-build.patch b/0007-Fix-build.patch similarity index 94% rename from 0013-Fix-build.patch rename to 0007-Fix-build.patch index 7a7590e..ab6697f 100644 --- a/0013-Fix-build.patch +++ b/0007-Fix-build.patch @@ -1,7 +1,7 @@ -From 2e8e8b87d800f1ef2e0fb0a6f0818de0a8fa0951 Mon Sep 17 00:00:00 2001 +From 342e5b7d0b45db4ed6679af4b40b05b4bd96de09 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 14 Jun 2021 12:45:37 +0100 -Subject: [PATCH 13/44] Fix build +Subject: [PATCH 07/38] Fix build 1b5e43a593e917610e6245f7a272ac081c508ba4 relied on a patch that we can't backport. @@ -42,5 +42,5 @@ index 69cc46a0..9091efbe 100644 class Q_WAYLAND_CLIENT_EXPORT QWaylandClientExtensionTemplatePrivate : public QWaylandClientExtensionPrivate -- -2.35.1 +2.36.1 diff --git a/0014-Fix-remove-listener.patch b/0008-Fix-remove-listener.patch similarity index 91% rename from 0014-Fix-remove-listener.patch rename to 0008-Fix-remove-listener.patch index 3ac54e6..75199ed 100644 --- a/0014-Fix-remove-listener.patch +++ b/0008-Fix-remove-listener.patch @@ -1,7 +1,7 @@ -From 88b2e6c9728d01a9aa334026629fbb1ce85fe197 Mon Sep 17 00:00:00 2001 +From 7d6a8aa51603e39a5da5b87af2acd0433a265987 Mon Sep 17 00:00:00 2001 From: Zhang Liang Date: Mon, 1 Feb 2021 19:29:43 +0800 -Subject: [PATCH 14/44] Fix: remove listener +Subject: [PATCH 08/38] Fix: remove listener Add the operation for removing the listener form listener list @@ -29,5 +29,5 @@ index f10c1f79..e0dfe8b2 100644 uint32_t QWaylandDisplay::currentTimeMillisec() -- -2.35.1 +2.36.1 diff --git a/0015-Hook-up-queryKeyboardModifers.patch b/0009-Hook-up-queryKeyboardModifers.patch similarity index 93% rename from 0015-Hook-up-queryKeyboardModifers.patch rename to 0009-Hook-up-queryKeyboardModifers.patch index 32d0786..6d2963c 100644 --- a/0015-Hook-up-queryKeyboardModifers.patch +++ b/0009-Hook-up-queryKeyboardModifers.patch @@ -1,7 +1,7 @@ -From 75693b47dcac101f74f98e5902c4c6b39d407e4f Mon Sep 17 00:00:00 2001 +From bea49655add94c2ab77ec39dfe33bf6c7f5ce927 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Wed, 26 May 2021 14:49:40 +0200 -Subject: [PATCH 15/44] Hook up queryKeyboardModifers +Subject: [PATCH 09/38] Hook up queryKeyboardModifers Can be useful when upon enter a modifiers event is received but no key event so no QKeyEvent is generated. @@ -51,5 +51,5 @@ index ff70ae25..73b80658 100644 QStringList themeNames() const override; -- -2.35.1 +2.36.1 diff --git a/0016-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch b/0010-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch similarity index 89% rename from 0016-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch rename to 0010-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch index d57c915..97a64ab 100644 --- a/0016-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch +++ b/0010-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch @@ -1,7 +1,7 @@ -From 537c5d43941d26d89ebf00f6abf7f12f9bac1caf Mon Sep 17 00:00:00 2001 +From c7022c1c0107781993b1d13e7aa11dd3f7486249 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 13 Jul 2021 13:32:15 +0200 -Subject: [PATCH 16/44] Do not update the mask if we do not have a surface +Subject: [PATCH 10/38] Do not update the mask if we do not have a surface mMask serves as a cache to remember what we've sent, the source of truth for the value is window()->mask(). @@ -40,5 +40,5 @@ index e96d8fe9..bd70f4af 100644 mSurface->set_input_region(nullptr); -- -2.35.1 +2.36.1 diff --git a/0017-Correctly-detect-if-image-format-is-supported-by-QIm.patch b/0011-Correctly-detect-if-image-format-is-supported-by-QIm.patch similarity index 95% rename from 0017-Correctly-detect-if-image-format-is-supported-by-QIm.patch rename to 0011-Correctly-detect-if-image-format-is-supported-by-QIm.patch index b72c0fa..0906b9f 100644 --- a/0017-Correctly-detect-if-image-format-is-supported-by-QIm.patch +++ b/0011-Correctly-detect-if-image-format-is-supported-by-QIm.patch @@ -1,7 +1,7 @@ -From ae3ea8875b9475532e5779154e3992affe2b9a32 Mon Sep 17 00:00:00 2001 +From 83a5e079e4bdf567010abc0b7d67eff052b76249 Mon Sep 17 00:00:00 2001 From: Jan Blackquill Date: Tue, 24 Aug 2021 14:36:34 -0400 -Subject: [PATCH 17/44] Correctly detect if image format is supported by +Subject: [PATCH 11/38] Correctly detect if image format is supported by QImageWriter The code queries potential image formats by stripping a mimetype of its @@ -64,5 +64,5 @@ index a5fdd34d..051a91dc 100644 fmt = imgFmt; } -- -2.35.1 +2.36.1 diff --git a/0018-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch b/0012-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch similarity index 88% rename from 0018-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch rename to 0012-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch index 180cca7..30dab6e 100644 --- a/0018-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch +++ b/0012-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch @@ -1,7 +1,7 @@ -From 8d673fe2edebe2c5bf338a779ef22ae212dc244a Mon Sep 17 00:00:00 2001 +From 19d0878e56094b5cced1154ce07f566f2b147e2a Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 14 Sep 2021 11:56:23 +0200 -Subject: [PATCH 18/44] Wayland client: Fix crash when windows are shown/hidden +Subject: [PATCH 12/38] Wayland client: Fix crash when windows are shown/hidden during drag Fixes: QTBUG-87624 @@ -27,5 +27,5 @@ index 54a69c3c..bbd2d568 100644 return; // Ignore foreign surfaces -- -2.35.1 +2.36.1 diff --git a/0019-Client-Don-t-always-recreate-frame-callbacks.patch b/0013-Client-Don-t-always-recreate-frame-callbacks.patch similarity index 96% rename from 0019-Client-Don-t-always-recreate-frame-callbacks.patch rename to 0013-Client-Don-t-always-recreate-frame-callbacks.patch index 2e0393a..6a4672a 100644 --- a/0019-Client-Don-t-always-recreate-frame-callbacks.patch +++ b/0013-Client-Don-t-always-recreate-frame-callbacks.patch @@ -1,7 +1,7 @@ -From bdd2dacf2d8668b3a1f59db3c6cc859f95868eb2 Mon Sep 17 00:00:00 2001 +From abaa0b1765551533112944e624ac5989df7d7b6c Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 27 May 2021 19:55:04 -0300 -Subject: [PATCH 19/44] Client: Don't always recreate frame callbacks +Subject: [PATCH 13/38] Client: Don't always recreate frame callbacks The main QWaylandWindow method that is executed when handling updates is QWaylandWindow::handleUpdate(). This method always, unconditionally queues @@ -73,5 +73,5 @@ index 2fdd0a7c..e2593314 100644 void tst_xdgshell::popup() -- -2.35.1 +2.36.1 diff --git a/0020-Client-Always-destroy-frame-callback-in-the-actual-c.patch b/0014-Client-Always-destroy-frame-callback-in-the-actual-c.patch similarity index 93% rename from 0020-Client-Always-destroy-frame-callback-in-the-actual-c.patch rename to 0014-Client-Always-destroy-frame-callback-in-the-actual-c.patch index 0c8b2e8..eef836e 100644 --- a/0020-Client-Always-destroy-frame-callback-in-the-actual-c.patch +++ b/0014-Client-Always-destroy-frame-callback-in-the-actual-c.patch @@ -1,7 +1,7 @@ -From fb0a5265ec9d83b56563769cc1b756aeca42ce65 Mon Sep 17 00:00:00 2001 +From 1428e39b6e686faf4d25ab4f8506662bcc23e6f9 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 27 May 2021 20:02:53 -0300 -Subject: [PATCH 20/44] Client: Always destroy frame callback in the actual +Subject: [PATCH 14/38] Client: Always destroy frame callback in the actual callback It's good hygiene to destroy all frame callbacks. Destroy the @@ -54,5 +54,5 @@ index 85307875..c020a58f 100644 struct ::wl_surface *wrappedSurface = reinterpret_cast(wl_proxy_create_wrapper(mSurface->object())); wl_proxy_set_queue(reinterpret_cast(wrappedSurface), mFrameQueue.queue); -- -2.35.1 +2.36.1 diff --git a/0021-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch b/0015-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch similarity index 90% rename from 0021-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch rename to 0015-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch index 3d0db90..74e78b3 100644 --- a/0021-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch +++ b/0015-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch @@ -1,7 +1,7 @@ -From 1e0519c6465335dd380ad8d8209969c71eb78d48 Mon Sep 17 00:00:00 2001 +From 132be08e4d81c1e05b93f31a6e2b6a6bd65d5726 Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Fri, 15 Oct 2021 12:55:33 -0400 -Subject: [PATCH 21/44] Fix the logic for decoding modifiers map in Wayland +Subject: [PATCH 15/38] Fix the logic for decoding modifiers map in Wayland text input protocol Correctly check for the flags in the modifiers map when we get it from @@ -36,5 +36,5 @@ index 503fd735..e290baa2 100644 return ret; } -- -2.35.1 +2.36.1 diff --git a/0022-Wayland-client-use-wl_keyboard-to-determine-active-s.patch b/0016-Wayland-client-use-wl_keyboard-to-determine-active-s.patch similarity index 99% rename from 0022-Wayland-client-use-wl_keyboard-to-determine-active-s.patch rename to 0016-Wayland-client-use-wl_keyboard-to-determine-active-s.patch index 9ffc1d9..8d1b6fc 100644 --- a/0022-Wayland-client-use-wl_keyboard-to-determine-active-s.patch +++ b/0016-Wayland-client-use-wl_keyboard-to-determine-active-s.patch @@ -1,7 +1,7 @@ -From 64e133f830ce48b6732397325b768ed9193c2cb4 Mon Sep 17 00:00:00 2001 +From f73a3ec466eb30e554f918d6d2da2c5d1b0e23bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Wed, 18 Aug 2021 18:28:20 +0200 -Subject: [PATCH 22/44] Wayland client: use wl_keyboard to determine active +Subject: [PATCH 16/38] Wayland client: use wl_keyboard to determine active state Commit f497a5bb87270174b8e0106b7eca1992d44ff15d made QWaylandDisplay @@ -337,5 +337,5 @@ index e2593314..73d1eb9c 100644 const QSize screenSize(640, 480); const uint maximizedSerial = exec([=] { -- -2.35.1 +2.36.1 diff --git a/0023-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch b/0017-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch similarity index 93% rename from 0023-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch rename to 0017-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch index 69b5293..a4a2f89 100644 --- a/0023-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch +++ b/0017-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch @@ -1,7 +1,7 @@ -From 167a89d23d4db6f62ef8336002fe306829604a77 Mon Sep 17 00:00:00 2001 +From 83440ae9e002f0c7bdec6b54db6b382d2e28bf7d Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 16 Jul 2021 13:00:03 +0200 -Subject: [PATCH 23/44] Client: do not empty clipboard when a new popup/window +Subject: [PATCH 17/38] Client: do not empty clipboard when a new popup/window is opened If we open a new popup or a window within the same app we have to avoid @@ -45,7 +45,7 @@ index 27303110..9f595af3 100644 const wl_callback_listener QWaylandDisplay::syncCallbackListener = { diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp -index ae045f4f..514457e9 100644 +index 613fe862..aaec7eb8 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -1300,14 +1300,6 @@ void QWaylandInputDevice::Keyboard::handleFocusDestroyed() @@ -64,5 +64,5 @@ index ae045f4f..514457e9 100644 mRepeatTimer.stop(); } -- -2.35.1 +2.36.1 diff --git a/0024-Set-preedit-cursor-when-cursor-equals-to-0.patch b/0018-Set-preedit-cursor-when-cursor-equals-to-0.patch similarity index 89% rename from 0024-Set-preedit-cursor-when-cursor-equals-to-0.patch rename to 0018-Set-preedit-cursor-when-cursor-equals-to-0.patch index 3694fe2..f78a678 100644 --- a/0024-Set-preedit-cursor-when-cursor-equals-to-0.patch +++ b/0018-Set-preedit-cursor-when-cursor-equals-to-0.patch @@ -1,7 +1,7 @@ -From 5ea11ccde21448f5c61978bf52e2f3db79a7143c Mon Sep 17 00:00:00 2001 +From 1a476429c2d9034322d5b3366ce53375e484353a Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Sat, 18 Dec 2021 23:42:49 -0800 -Subject: [PATCH 24/44] Set preedit cursor when cursor equals to 0 +Subject: [PATCH 18/38] Set preedit cursor when cursor equals to 0 Pick-to: 6.3 6.2 5.15 Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58 @@ -25,5 +25,5 @@ index 526d0ef4..25be2509 100644 } else if (m_preeditCursor > 0) { attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant())); -- -2.35.1 +2.36.1 diff --git a/0025-Client-Implement-DataDeviceV3.patch b/0019-Client-Implement-DataDeviceV3.patch similarity index 99% rename from 0025-Client-Implement-DataDeviceV3.patch rename to 0019-Client-Implement-DataDeviceV3.patch index 6087e85..34a6f90 100644 --- a/0025-Client-Implement-DataDeviceV3.patch +++ b/0019-Client-Implement-DataDeviceV3.patch @@ -1,7 +1,7 @@ -From 95783492ae8df7f84c3c13351df5dc114288e96e Mon Sep 17 00:00:00 2001 +From 8afae71a44d0d5a0be477863da791dd2dfe2027d Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 16 Feb 2021 09:51:47 +0000 -Subject: [PATCH 25/44] Client: Implement DataDeviceV3 +Subject: [PATCH 19/38] Client: Implement DataDeviceV3 DataDeviceV2 fixes a leak of DataDevice resources. @@ -509,5 +509,5 @@ index 1568b3b9..067410d0 100644 class DataDeviceCompositor : public DefaultCompositor { public: -- -2.35.1 +2.36.1 diff --git a/0026-Client-Delay-deletion-of-QDrag-object-until-after-we.patch b/0020-Client-Delay-deletion-of-QDrag-object-until-after-we.patch similarity index 93% rename from 0026-Client-Delay-deletion-of-QDrag-object-until-after-we.patch rename to 0020-Client-Delay-deletion-of-QDrag-object-until-after-we.patch index 3b3ebf3..83f747e 100644 --- a/0026-Client-Delay-deletion-of-QDrag-object-until-after-we.patch +++ b/0020-Client-Delay-deletion-of-QDrag-object-until-after-we.patch @@ -1,7 +1,7 @@ -From 8c9e148bb0aa25cbc831e2bd931d3bd54bc0fb46 Mon Sep 17 00:00:00 2001 +From e92aff243eca4c1e30c093692dce6f7c91d7a19c Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 18 Nov 2021 13:05:30 +0100 -Subject: [PATCH 26/44] Client: Delay deletion of QDrag object until after +Subject: [PATCH 20/38] Client: Delay deletion of QDrag object until after we're done with it In certain cases, most notably when performing drag and drop operations @@ -63,5 +63,5 @@ index 747f0190..46f629ac 100644 private: QWaylandDisplay *m_display = nullptr; -- -2.35.1 +2.36.1 diff --git a/0027-Client-Avoid-processing-of-events-when-showing-windo.patch b/0021-Client-Avoid-processing-of-events-when-showing-windo.patch similarity index 91% rename from 0027-Client-Avoid-processing-of-events-when-showing-windo.patch rename to 0021-Client-Avoid-processing-of-events-when-showing-windo.patch index dba5f52..8b104e4 100644 --- a/0027-Client-Avoid-processing-of-events-when-showing-windo.patch +++ b/0021-Client-Avoid-processing-of-events-when-showing-windo.patch @@ -1,7 +1,7 @@ -From b736b4488dcaa1a3c6b0c6059e5b85881f74c52b Mon Sep 17 00:00:00 2001 +From 340e89575c93435abab78ac73603b405f1f05ceb Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sun, 14 Nov 2021 13:54:19 +0000 -Subject: [PATCH 27/44] Client: Avoid processing of events when showing windows +Subject: [PATCH 21/38] Client: Avoid processing of events when showing windows The only time we want to dispatch events from the wayland socket is when the application is waiting for external events. Doing so at any other @@ -34,5 +34,5 @@ index ba881cb3..1597f67e 100644 setGeometry(windowGeometry()); // Don't flush the events here, or else the newly visible window may start drawing, but since -- -2.35.1 +2.36.1 diff --git a/0028-Handle-registry_global-out-of-constructor.patch b/0022-Handle-registry_global-out-of-constructor.patch similarity index 95% rename from 0028-Handle-registry_global-out-of-constructor.patch rename to 0022-Handle-registry_global-out-of-constructor.patch index 783ef7d..737f3a0 100644 --- a/0028-Handle-registry_global-out-of-constructor.patch +++ b/0022-Handle-registry_global-out-of-constructor.patch @@ -1,7 +1,7 @@ -From 771705eee02b4d752beee22ef5408ccbd72078cc Mon Sep 17 00:00:00 2001 +From de7afd339100cac1470f875eafc22d3ee87870bd Mon Sep 17 00:00:00 2001 From: Elvis Lee Date: Thu, 18 Feb 2021 15:45:49 +0900 -Subject: [PATCH 28/44] Handle registry_global out of constructor +Subject: [PATCH 22/38] Handle registry_global out of constructor Factory functions in QWaylandDisplay::registry_global() can be overridden. Later, other classes instantiated in the registry_global can support @@ -81,5 +81,5 @@ index e5e7dd42..f5632982 100644 mDisplay->ensureScreen(); } -- -2.35.1 +2.36.1 diff --git a/0029-Connect-flushRequest-after-forceRoundTrip.patch b/0023-Connect-flushRequest-after-forceRoundTrip.patch similarity index 94% rename from 0029-Connect-flushRequest-after-forceRoundTrip.patch rename to 0023-Connect-flushRequest-after-forceRoundTrip.patch index 967d764..27a8c6f 100644 --- a/0029-Connect-flushRequest-after-forceRoundTrip.patch +++ b/0023-Connect-flushRequest-after-forceRoundTrip.patch @@ -1,7 +1,7 @@ -From 725c5de6bdd528d1fa03f1de5ec91585eb110d83 Mon Sep 17 00:00:00 2001 +From a5df6f67f446ed091c688336510b5da2970a0d84 Mon Sep 17 00:00:00 2001 From: Elvis Lee Date: Wed, 17 Mar 2021 16:31:10 +0900 -Subject: [PATCH 29/44] Connect flushRequest after forceRoundTrip +Subject: [PATCH 23/38] Connect flushRequest after forceRoundTrip If flushRequest is connected with aboutToBlock, the flushRequest may consumes all events so that processEvents might be blocked in forceRoundTrip. @@ -43,5 +43,5 @@ index f5632982..3a6fa651 100644 mDisplay->ensureScreen(); } -- -2.35.1 +2.36.1 diff --git a/0030-Move-the-wayland-socket-polling-to-a-separate-event-.patch b/0024-Move-the-wayland-socket-polling-to-a-separate-event-.patch similarity index 99% rename from 0030-Move-the-wayland-socket-polling-to-a-separate-event-.patch rename to 0024-Move-the-wayland-socket-polling-to-a-separate-event-.patch index b6560be..a8cf189 100644 --- a/0030-Move-the-wayland-socket-polling-to-a-separate-event-.patch +++ b/0024-Move-the-wayland-socket-polling-to-a-separate-event-.patch @@ -1,7 +1,7 @@ -From 91d36a2497f3289996d788c8974583bccac3c842 Mon Sep 17 00:00:00 2001 +From 967883d20e94183bd9cf6648297b9d76ba0e167e Mon Sep 17 00:00:00 2001 From: Adrien Faveraux Date: Fri, 26 Nov 2021 09:18:58 +0100 -Subject: [PATCH 30/44] Move the wayland socket polling to a separate event +Subject: [PATCH 24/38] Move the wayland socket polling to a separate event thread New event threads is introduced which calls poll() on the wayland fd, @@ -570,5 +570,5 @@ index e0687962..d45980a8 100644 // True when we have called deliverRequestUpdate, but the client has not yet attached a new buffer -- -2.35.1 +2.36.1 diff --git a/0031-Check-pointer-for-null-before-use-in-ASSERT.patch b/0025-Check-pointer-for-null-before-use-in-ASSERT.patch similarity index 86% rename from 0031-Check-pointer-for-null-before-use-in-ASSERT.patch rename to 0025-Check-pointer-for-null-before-use-in-ASSERT.patch index 2599e04..d6834c8 100644 --- a/0031-Check-pointer-for-null-before-use-in-ASSERT.patch +++ b/0025-Check-pointer-for-null-before-use-in-ASSERT.patch @@ -1,7 +1,7 @@ -From ca1d9023b6d40a128faad652f02881b5805e36ba Mon Sep 17 00:00:00 2001 +From 520f58c24e0fbb33f84f329fc9879b72710c77ae Mon Sep 17 00:00:00 2001 From: Roman Genkhel Date: Thu, 12 Nov 2020 12:21:51 +0300 -Subject: [PATCH 31/44] Check pointer for null before use in ASSERT +Subject: [PATCH 25/38] Check pointer for null before use in ASSERT Task-number: QTBUG-85195 Change-Id: I331e54f6e58aa9d536351a55223610c60b3cb414 @@ -26,5 +26,5 @@ index 7de19a74..ac01dc05 100644 buffer->setBusy(); -- -2.35.1 +2.36.1 diff --git a/0032-Do-not-create-decorations-when-the-shellSurface-is-n.patch b/0026-Do-not-create-decorations-when-the-shellSurface-is-n.patch similarity index 89% rename from 0032-Do-not-create-decorations-when-the-shellSurface-is-n.patch rename to 0026-Do-not-create-decorations-when-the-shellSurface-is-n.patch index 901b444..feab023 100644 --- a/0032-Do-not-create-decorations-when-the-shellSurface-is-n.patch +++ b/0026-Do-not-create-decorations-when-the-shellSurface-is-n.patch @@ -1,7 +1,7 @@ -From e6b30f42f8eec2ecc10395593dbfff354acd5425 Mon Sep 17 00:00:00 2001 +From 72f64f397c72afb22df1825382e17a310517add1 Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Mon, 1 Nov 2021 14:23:58 +0100 -Subject: [PATCH 32/44] Do not create decorations when the shellSurface is not +Subject: [PATCH 26/38] Do not create decorations when the shellSurface is not ready A cases reported that client windows try to make decorations @@ -35,5 +35,5 @@ index ac01dc05..acfe390e 100644 bool hadDecoration = mWindowDecoration; -- -2.35.1 +2.36.1 diff --git a/0033-Use-wl_surface.damage_buffer-on-the-client-side.patch b/0027-Use-wl_surface.damage_buffer-on-the-client-side.patch similarity index 97% rename from 0033-Use-wl_surface.damage_buffer-on-the-client-side.patch rename to 0027-Use-wl_surface.damage_buffer-on-the-client-side.patch index 717f68a..656c530 100644 --- a/0033-Use-wl_surface.damage_buffer-on-the-client-side.patch +++ b/0027-Use-wl_surface.damage_buffer-on-the-client-side.patch @@ -1,7 +1,7 @@ -From 3027c9659866101c06252829d99e7597cef19a40 Mon Sep 17 00:00:00 2001 +From 6935647966b456e760745a6b2a13a04ba6543803 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 6 Jul 2020 14:37:35 +0200 -Subject: [PATCH 33/44] Use wl_surface.damage_buffer on the client side +Subject: [PATCH 27/38] Use wl_surface.damage_buffer on the client side Prefer the newer, recommended damage_buffer when the compositor supports it. @@ -127,5 +127,5 @@ index 949dc23d..d176837e 100644 uint32_t callback) override; void surface_commit(Resource *resource) override; -- -2.35.1 +2.36.1 diff --git a/0034-Fix-crash-if-no-input-method-module-could-be-loaded.patch b/0028-Fix-crash-if-no-input-method-module-could-be-loaded.patch similarity index 88% rename from 0034-Fix-crash-if-no-input-method-module-could-be-loaded.patch rename to 0028-Fix-crash-if-no-input-method-module-could-be-loaded.patch index e8907de..d7b5942 100644 --- a/0034-Fix-crash-if-no-input-method-module-could-be-loaded.patch +++ b/0028-Fix-crash-if-no-input-method-module-could-be-loaded.patch @@ -1,7 +1,7 @@ -From 297c4e075068bffe4a396b2553afc4798c97fb4c Mon Sep 17 00:00:00 2001 +From 506d0372178134f208fd08b3f6b9499fc0e14a5e Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Thu, 3 Feb 2022 14:01:50 +0200 -Subject: [PATCH 34/44] Fix crash if no input method module could be loaded +Subject: [PATCH 28/38] Fix crash if no input method module could be loaded Pick-to: 6.2 6.3 5.15 Change-Id: I8f346def616606a6c5540856bd08a84ee7ed5ca2 @@ -25,5 +25,5 @@ index 3b876047..fbf00c6b 100644 QWaylandShellIntegration *QWaylandIntegration::createShellIntegration(const QString &integrationName) -- -2.35.1 +2.36.1 diff --git a/0035-Client-Remove-mWaitingForUpdateDelivery.patch b/0029-Client-Remove-mWaitingForUpdateDelivery.patch similarity index 96% rename from 0035-Client-Remove-mWaitingForUpdateDelivery.patch rename to 0029-Client-Remove-mWaitingForUpdateDelivery.patch index 67a10e2..50ee60d 100644 --- a/0035-Client-Remove-mWaitingForUpdateDelivery.patch +++ b/0029-Client-Remove-mWaitingForUpdateDelivery.patch @@ -1,7 +1,7 @@ -From a97759d032a40045551546ca17300891d4067ee4 Mon Sep 17 00:00:00 2001 +From c2e56e076f0ded39b1ab34ebf07afad2f344f53f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 1 Feb 2022 13:05:36 +0200 -Subject: [PATCH 35/44] Client: Remove mWaitingForUpdateDelivery +Subject: [PATCH 29/38] Client: Remove mWaitingForUpdateDelivery Currently, mWaitingForUpdateDelivery is shared between the main thread (doHandleFrameCallback()) and the frame callback event thread @@ -75,5 +75,5 @@ index d45980a8..3ff68ccb 100644 QElapsedTimer mFrameCallbackElapsedTimer; struct ::wl_callback *mFrameCallback = nullptr; -- -2.35.1 +2.36.1 diff --git a/0036-Cursor-position-0-should-still-show-the-cursor.patch b/0030-Cursor-position-0-should-still-show-the-cursor.patch similarity index 90% rename from 0036-Cursor-position-0-should-still-show-the-cursor.patch rename to 0030-Cursor-position-0-should-still-show-the-cursor.patch index a116f46..7a70d95 100644 --- a/0036-Cursor-position-0-should-still-show-the-cursor.patch +++ b/0030-Cursor-position-0-should-still-show-the-cursor.patch @@ -1,7 +1,7 @@ -From d3b794920d643fc5d722f63ad52b91e8143c0de0 Mon Sep 17 00:00:00 2001 +From 2d0bd70b55ebde2e22d0b95e8122235f90c8f9f1 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Tue, 8 Feb 2022 07:11:25 -0800 -Subject: [PATCH 36/44] Cursor position == 0 should still show the cursor +Subject: [PATCH 30/38] Cursor position == 0 should still show the cursor Otherwise the cursor would be hidden even if preedit is empty. Amends 719a55be13bdadfa659a732755f280e276a894bd @@ -31,5 +31,5 @@ index 25be2509..458d818e 100644 } -- -2.35.1 +2.36.1 diff --git a/0037-Update-the-preedit-styling-mapping.patch b/0031-Update-the-preedit-styling-mapping.patch similarity index 96% rename from 0037-Update-the-preedit-styling-mapping.patch rename to 0031-Update-the-preedit-styling-mapping.patch index ce41df1..f854642 100644 --- a/0037-Update-the-preedit-styling-mapping.patch +++ b/0031-Update-the-preedit-styling-mapping.patch @@ -1,7 +1,7 @@ -From 3ddd4dcb1790920ce2598ebdbe14c95bdba55005 Mon Sep 17 00:00:00 2001 +From f0f7b2bea822f73ae00fcfd4ee1679596d550a20 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Wed, 22 Dec 2021 10:42:38 -0800 -Subject: [PATCH 37/44] Update the preedit styling mapping +Subject: [PATCH 31/38] Update the preedit styling mapping - None mapping to no style. - Default/Underline mapping to underline. @@ -84,5 +84,5 @@ index 458d818e..f50ccf30 100644 break; } -- -2.35.1 +2.36.1 diff --git a/0038-client-Simplify-round-trip-behavior.patch b/0032-client-Simplify-round-trip-behavior.patch similarity index 95% rename from 0038-client-Simplify-round-trip-behavior.patch rename to 0032-client-Simplify-round-trip-behavior.patch index 8191f7d..f12ebb8 100644 --- a/0038-client-Simplify-round-trip-behavior.patch +++ b/0032-client-Simplify-round-trip-behavior.patch @@ -1,7 +1,7 @@ -From 971dbf2d5be743ddeb998f7461ff3e06ccb892c4 Mon Sep 17 00:00:00 2001 +From 596ecf46bb0c2427cda2894dd2157b3f5a2cd34f Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 9 Feb 2022 17:20:48 +0000 -Subject: [PATCH 38/44] client: Simplify round trip behavior +Subject: [PATCH 32/38] client: Simplify round trip behavior The custom event queue was removed in 302d4ffb8549214eb4028dc3e47ec4ee4e12ffbd (2015) so the comment about not @@ -78,5 +78,5 @@ index 6f1bada5..86045a35 100644 bool QWaylandDisplay::supportsWindowDecoration() const -- -2.35.1 +2.36.1 diff --git a/0039-Client-Fix-opaque-region-setter.patch b/0033-Client-Fix-opaque-region-setter.patch similarity index 89% rename from 0039-Client-Fix-opaque-region-setter.patch rename to 0033-Client-Fix-opaque-region-setter.patch index 4978882..792d0bd 100644 --- a/0039-Client-Fix-opaque-region-setter.patch +++ b/0033-Client-Fix-opaque-region-setter.patch @@ -1,7 +1,7 @@ -From 9930ed9942d2d26211195571673bea35261ad26b Mon Sep 17 00:00:00 2001 +From f7b7b39d00ae31676fc678446d7090e7a9dd95b4 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 19 Feb 2022 17:01:04 +0200 -Subject: [PATCH 39/44] Client: Fix opaque region setter +Subject: [PATCH 33/38] Client: Fix opaque region setter The rect is in the global coordinate system, while the opaque region must be in the surface local coordinate system. @@ -27,5 +27,5 @@ index 949374b1..fee2ecdd 100644 void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset) -- -2.35.1 +2.36.1 diff --git a/0040-Use-proper-dependencies-in-compile-tests.patch b/0034-Use-proper-dependencies-in-compile-tests.patch similarity index 96% rename from 0040-Use-proper-dependencies-in-compile-tests.patch rename to 0034-Use-proper-dependencies-in-compile-tests.patch index 3f15c7f..a2f1730 100644 --- a/0040-Use-proper-dependencies-in-compile-tests.patch +++ b/0034-Use-proper-dependencies-in-compile-tests.patch @@ -1,7 +1,7 @@ -From 118674630cdb5933e66a8b4415afe7c716ad4662 Mon Sep 17 00:00:00 2001 +From 6a95428357872353a20ab6dcc5f8facdb520e8dc Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Fri, 4 Feb 2022 11:07:36 +0100 -Subject: [PATCH 40/44] Use proper dependencies in compile tests +Subject: [PATCH 34/38] Use proper dependencies in compile tests Use the dependencies as found by the "libraries" section instead of relying on them being available in the default location (e.g. "-ldrm"). @@ -122,5 +122,5 @@ index bcfd5215..da95d07b 100644 }, -- -2.35.1 +2.36.1 diff --git a/0041-client-update-button-state-and-etc-in-pointer_leave.patch b/0035-client-update-button-state-and-etc-in-pointer_leave.patch similarity index 89% rename from 0041-client-update-button-state-and-etc-in-pointer_leave.patch rename to 0035-client-update-button-state-and-etc-in-pointer_leave.patch index b98d0a8..eb8cdc9 100644 --- a/0041-client-update-button-state-and-etc-in-pointer_leave.patch +++ b/0035-client-update-button-state-and-etc-in-pointer_leave.patch @@ -1,7 +1,7 @@ -From a06fde8dae162166435833fca7844e2695e8480b Mon Sep 17 00:00:00 2001 +From 169052d99391eef62c181c8b5b107280688045d1 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 9 Mar 2022 10:47:42 +0100 -Subject: [PATCH 41/44] client: update button state and etc in pointer_leave() +Subject: [PATCH 35/38] client: update button state and etc in pointer_leave() The cleanup work needs to be done even the surface is null, for example, a window was closed in mouse press handler, then will not @@ -18,7 +18,7 @@ Reviewed-by: David Edmundson 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp -index 514457e9..aca42cdc 100644 +index aaec7eb8..c3cc4eca 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -685,6 +685,11 @@ public: @@ -46,5 +46,5 @@ index 514457e9..aca42cdc 100644 class MotionEvent : public QWaylandPointerEvent -- -2.35.1 +2.36.1 diff --git a/0042-Revert-Client-Remove-mWaitingForUpdateDelivery.patch b/0036-Revert-Client-Remove-mWaitingForUpdateDelivery.patch similarity index 94% rename from 0042-Revert-Client-Remove-mWaitingForUpdateDelivery.patch rename to 0036-Revert-Client-Remove-mWaitingForUpdateDelivery.patch index d4fc97f..0a84f85 100644 --- a/0042-Revert-Client-Remove-mWaitingForUpdateDelivery.patch +++ b/0036-Revert-Client-Remove-mWaitingForUpdateDelivery.patch @@ -1,7 +1,7 @@ -From 1acd85e8b71610141bbe5bfc804e92ddafb56505 Mon Sep 17 00:00:00 2001 +From 36756f5d1b8891465bddd31e990c81e149dce0f1 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 15 Mar 2022 15:59:15 +0100 -Subject: [PATCH 42/44] Revert "Client: Remove mWaitingForUpdateDelivery" +Subject: [PATCH 36/38] Revert "Client: Remove mWaitingForUpdateDelivery" The reverted commit introduces a severe performance regression when a client window is resized while a QtQuick renderthread @@ -55,5 +55,5 @@ index 3ff68ccb..d45980a8 100644 QElapsedTimer mFrameCallbackElapsedTimer; struct ::wl_callback *mFrameCallback = nullptr; -- -2.35.1 +2.36.1 diff --git a/0043-Fix-race-condition-on-mWaitingForUpdateDelivery.patch b/0037-Fix-race-condition-on-mWaitingForUpdateDelivery.patch similarity index 94% rename from 0043-Fix-race-condition-on-mWaitingForUpdateDelivery.patch rename to 0037-Fix-race-condition-on-mWaitingForUpdateDelivery.patch index 6465b98..29a97d5 100644 --- a/0043-Fix-race-condition-on-mWaitingForUpdateDelivery.patch +++ b/0037-Fix-race-condition-on-mWaitingForUpdateDelivery.patch @@ -1,7 +1,7 @@ -From 3c9619bded58f09a85df01a4ef46474bf147b2a0 Mon Sep 17 00:00:00 2001 +From a83e65ddc9a965b25e435d136849a50f0b99c4ae Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 15 Mar 2022 16:53:04 +0100 -Subject: [PATCH 43/44] Fix race condition on mWaitingForUpdateDelivery +Subject: [PATCH 37/38] Fix race condition on mWaitingForUpdateDelivery Change-Id: I0e91bda73722468b9339fc434fe04420b5e7d3da Reviewed-by: David Edmundson @@ -55,5 +55,5 @@ index d45980a8..cb9135f6 100644 QElapsedTimer mFrameCallbackElapsedTimer; struct ::wl_callback *mFrameCallback = nullptr; -- -2.35.1 +2.36.1 diff --git a/0044-use-poll-2-when-reading-from-clipboard.patch b/0038-use-poll-2-when-reading-from-clipboard.patch similarity index 92% rename from 0044-use-poll-2-when-reading-from-clipboard.patch rename to 0038-use-poll-2-when-reading-from-clipboard.patch index 4069a58..29fc248 100644 --- a/0044-use-poll-2-when-reading-from-clipboard.patch +++ b/0038-use-poll-2-when-reading-from-clipboard.patch @@ -1,7 +1,7 @@ -From 398040301e439cc20bcd537bad7095d7eb6f285a Mon Sep 17 00:00:00 2001 +From 36659e6130ed3fc2b3f0c91423408ef5ecb7b991 Mon Sep 17 00:00:00 2001 From: Kenneth Topp Date: Mon, 4 Apr 2022 09:36:21 -0400 -Subject: [PATCH 44/44] use poll(2) when reading from clipboard +Subject: [PATCH 38/38] use poll(2) when reading from clipboard change clipboard read away from select(2) call which can fail when an application has large number of open files @@ -44,5 +44,5 @@ index c9e158cc..fe0ea8c9 100644 } else if (ready == 0) { qWarning("QWaylandDataOffer: timeout reading from pipe"); -- -2.35.1 +2.36.1 diff --git a/0050-Client-set-constraint-adjustments-for-popups-in-xdg.patch b/0050-Client-set-constraint-adjustments-for-popups-in-xdg.patch new file mode 100644 index 0000000..4320d76 --- /dev/null +++ b/0050-Client-set-constraint-adjustments-for-popups-in-xdg.patch @@ -0,0 +1,33 @@ +From 48b9dbb4d9d508895f7568531d8f0a7e63261b75 Mon Sep 17 00:00:00 2001 +From: Liang Qi +Date: Tue, 4 Jan 2022 12:30:36 +0100 +Subject: [PATCH] client: set_constraint_adjustment() for popups in xdg + +See also https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/xdg-shell/xdg-shell.xml#n234 . + +Kudos to Greg V for his original patch in jira. + +Fixes: QTBUG-87303 +Pick-to: 5.15 6.2 6.3 +Done-with: Greg V +Change-Id: I57df9aedea7cc6f0b6fa142a6fc6c3bdc98324c8 +Reviewed-by: David Edmundson +(cherry picked from commit 59a5fe99e1569421b920d99c5b20cdafcdcf43a9) +diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +index 1c76294..3b99c4b 100644 +--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp ++++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +@@ -410,6 +410,13 @@ void QWaylandXdgSurface::setPopup(QWaylandWindow *parent) + positioner->set_anchor(QtWayland::xdg_positioner::anchor_top_left); + positioner->set_gravity(QtWayland::xdg_positioner::gravity_bottom_right); + positioner->set_size(m_window->geometry().width(), m_window->geometry().height()); ++ const QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP"); ++ if (currentDesktop != QByteArray("KDE")) { ++ positioner->set_constraint_adjustment(QtWayland::xdg_positioner::constraint_adjustment_slide_x ++ | QtWayland::xdg_positioner::constraint_adjustment_slide_y ++ | QtWayland::xdg_positioner::constraint_adjustment_flip_x ++ | QtWayland::xdg_positioner::constraint_adjustment_flip_y); ++ } + m_popup = new Popup(this, parentXdgSurface, positioner); + positioner->destroy(); + delete positioner; diff --git a/qt5-qtwayland.spec b/qt5-qtwayland.spec index 5b9e603..c8f5e6a 100644 --- a/qt5-qtwayland.spec +++ b/qt5-qtwayland.spec @@ -2,8 +2,8 @@ Summary: Qt5 - Wayland platform support and QtCompositor module Name: qt5-%{qt_module} -Version: 5.15.3 -Release: 2%{?dist} +Version: 5.15.4 +Release: 1%{?dist} License: LGPLv3 Url: http://www.qt.io @@ -13,51 +13,47 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod ## Upstream patches ## repo: https://invent.kde.org/qt/qt/qtwayland ## branch: kde/5.15 -## git format-patch v5.15.3-lts-lgpl -Patch1: 0001-Use-qWarning-and-_exit-instead-of-qFatal-for-wayland.patch -Patch2: 0002-Translate-opaque-area-with-frame-margins.patch -Patch3: 0003-Client-Send-exposeEvent-to-parent-on-subsurface-posi.patch -Patch4: 0004-Get-correct-decoration-margins-region.patch -Patch5: 0005-xdgshell-Tell-the-compositor-the-screen-we-re-expect.patch -Patch6: 0006-client-Allow-QWaylandInputContext-to-accept-composed.patch -Patch7: 0007-Client-Announce-an-output-after-receiving-more-compl.patch -Patch8: 0008-Fix-issue-with-repeated-window-size-changes.patch -Patch9: 0009-Include-locale.h-for-setlocale-LC_CTYPE.patch -Patch10: 0010-Client-Connect-drags-being-accepted-to-updating-the-.patch -Patch11: 0011-Client-Disconnect-registry-listener-on-destruction.patch -Patch12: 0012-Client-Set-XdgShell-size-hints-before-the-first-comm.patch -Patch13: 0013-Fix-build.patch -Patch14: 0014-Fix-remove-listener.patch -Patch15: 0015-Hook-up-queryKeyboardModifers.patch -Patch16: 0016-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch -Patch17: 0017-Correctly-detect-if-image-format-is-supported-by-QIm.patch -Patch18: 0018-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch -Patch19: 0019-Client-Don-t-always-recreate-frame-callbacks.patch -Patch20: 0020-Client-Always-destroy-frame-callback-in-the-actual-c.patch -Patch21: 0021-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch -Patch22: 0022-Wayland-client-use-wl_keyboard-to-determine-active-s.patch -Patch23: 0023-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch -Patch24: 0024-Set-preedit-cursor-when-cursor-equals-to-0.patch -Patch25: 0025-Client-Implement-DataDeviceV3.patch -Patch26: 0026-Client-Delay-deletion-of-QDrag-object-until-after-we.patch -Patch27: 0027-Client-Avoid-processing-of-events-when-showing-windo.patch -Patch28: 0028-Handle-registry_global-out-of-constructor.patch -Patch29: 0029-Connect-flushRequest-after-forceRoundTrip.patch -Patch30: 0030-Move-the-wayland-socket-polling-to-a-separate-event-.patch -Patch31: 0031-Check-pointer-for-null-before-use-in-ASSERT.patch -Patch32: 0032-Do-not-create-decorations-when-the-shellSurface-is-n.patch -Patch33: 0033-Use-wl_surface.damage_buffer-on-the-client-side.patch -Patch34: 0034-Fix-crash-if-no-input-method-module-could-be-loaded.patch -Patch35: 0035-Client-Remove-mWaitingForUpdateDelivery.patch -Patch36: 0036-Cursor-position-0-should-still-show-the-cursor.patch -Patch37: 0037-Update-the-preedit-styling-mapping.patch -Patch38: 0038-client-Simplify-round-trip-behavior.patch -Patch39: 0039-Client-Fix-opaque-region-setter.patch -Patch40: 0040-Use-proper-dependencies-in-compile-tests.patch -Patch41: 0041-client-update-button-state-and-etc-in-pointer_leave.patch -Patch42: 0042-Revert-Client-Remove-mWaitingForUpdateDelivery.patch -Patch43: 0043-Fix-race-condition-on-mWaitingForUpdateDelivery.patch -Patch44: 0044-use-poll-2-when-reading-from-clipboard.patch +## git format-patch v5.15.4-lts-lgpl +Patch1: 0001-Client-Announce-an-output-after-receiving-more-compl.patch +Patch2: 0002-Fix-issue-with-repeated-window-size-changes.patch +Patch3: 0003-Include-locale.h-for-setlocale-LC_CTYPE.patch +Patch4: 0004-Client-Connect-drags-being-accepted-to-updating-the-.patch +Patch5: 0005-Client-Disconnect-registry-listener-on-destruction.patch +Patch6: 0006-Client-Set-XdgShell-size-hints-before-the-first-comm.patch +Patch7: 0007-Fix-build.patch +Patch8: 0008-Fix-remove-listener.patch +Patch9: 0009-Hook-up-queryKeyboardModifers.patch +Patch10: 0010-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch +Patch11: 0011-Correctly-detect-if-image-format-is-supported-by-QIm.patch +Patch12: 0012-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch +Patch13: 0013-Client-Don-t-always-recreate-frame-callbacks.patch +Patch14: 0014-Client-Always-destroy-frame-callback-in-the-actual-c.patch +Patch15: 0015-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch +Patch16: 0016-Wayland-client-use-wl_keyboard-to-determine-active-s.patch +Patch17: 0017-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch +Patch18: 0018-Set-preedit-cursor-when-cursor-equals-to-0.patch +Patch19: 0019-Client-Implement-DataDeviceV3.patch +Patch20: 0020-Client-Delay-deletion-of-QDrag-object-until-after-we.patch +Patch21: 0021-Client-Avoid-processing-of-events-when-showing-windo.patch +Patch22: 0022-Handle-registry_global-out-of-constructor.patch +Patch23: 0023-Connect-flushRequest-after-forceRoundTrip.patch +Patch24: 0024-Move-the-wayland-socket-polling-to-a-separate-event-.patch +Patch25: 0025-Check-pointer-for-null-before-use-in-ASSERT.patch +Patch26: 0026-Do-not-create-decorations-when-the-shellSurface-is-n.patch +Patch27: 0027-Use-wl_surface.damage_buffer-on-the-client-side.patch +Patch28: 0028-Fix-crash-if-no-input-method-module-could-be-loaded.patch +Patch29: 0029-Client-Remove-mWaitingForUpdateDelivery.patch +Patch30: 0030-Cursor-position-0-should-still-show-the-cursor.patch +Patch31: 0031-Update-the-preedit-styling-mapping.patch +Patch32: 0032-client-Simplify-round-trip-behavior.patch +Patch33: 0033-Client-Fix-opaque-region-setter.patch +Patch34: 0034-Use-proper-dependencies-in-compile-tests.patch +Patch35: 0035-client-update-button-state-and-etc-in-pointer_leave.patch +Patch36: 0036-Revert-Client-Remove-mWaitingForUpdateDelivery.patch +Patch37: 0037-Fix-race-condition-on-mWaitingForUpdateDelivery.patch +Patch38: 0038-use-poll-2-when-reading-from-clipboard.patch + +Patch50: 0050-Client-set-constraint-adjustments-for-popups-in-xdg.patch # Disable for now, there is a Qt bug making this broken # Patch102: qtwayland-decoration-support-backports-from-qt6.patch @@ -170,6 +166,9 @@ popd %changelog +* Mon May 16 2022 Jan Grulich - 5.15.4-1 +- 5.15.4 + * Fri Apr 15 2022 Kenneth Topp - 5.15.3-2 - Pull in latest kde/5.15 branch fixes diff --git a/qtwayland-client-expose-toplevel-window-state.patch b/qtwayland-client-expose-toplevel-window-state.patch deleted file mode 100644 index 7823473..0000000 --- a/qtwayland-client-expose-toplevel-window-state.patch +++ /dev/null @@ -1,166 +0,0 @@ -From d533901938a996367d7b6f87b0214f5a17098aed Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Tue, 23 Mar 2021 16:03:22 +0100 -Subject: [PATCH] Client: expose toplevel window state - -QWaylandWindow has only basic information about window state, like if -it's active or maximized, but it has no information about tiling, which -can be useful for client-side decorations. We also need to bump version -of xdg-shell protocol we support, because additional states are not in -the version currently supported by QtWayland. It shouldn't be a problem -to increase the version as the new version adds just these additional -window states. - -Change-Id: I4c46516d9c7296c69ea51a022b3bdb4ca06bef8d -Reviewed-by: David Edmundson ---- - src/client/qwaylandwindow.cpp | 15 +++++++++++++++ - src/client/qwaylandwindow_p.h | 16 ++++++++++++++++ - .../xdg-shell/qwaylandxdgshell.cpp | 16 +++++++++++++++- - .../xdg-shell/qwaylandxdgshell_p.h | 3 ++- - 4 files changed, 48 insertions(+), 2 deletions(-) - -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index ba881cb..a1e891d 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -1089,6 +1089,16 @@ Qt::WindowStates QWaylandWindow::windowStates() const - return mLastReportedWindowStates; - } - -+QWaylandWindow::ToplevelWindowTilingStates QWaylandWindow::toplevelWindowTilingStates() const -+{ -+ return mLastReportedToplevelWindowTilingStates; -+} -+ -+void QWaylandWindow::handleToplevelWindowTilingStatesChanged(ToplevelWindowTilingStates states) -+{ -+ mLastReportedToplevelWindowTilingStates = states; -+} -+ - void QWaylandWindow::handleWindowStatesChanged(Qt::WindowStates states) - { - createDecoration(); -diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h -index e068796..f4e5d3d 100644 ---- a/src/client/qwaylandwindow_p.h -+++ b/src/client/qwaylandwindow_p.h -@@ -95,6 +95,15 @@ public: - Vulkan - }; - -+ enum ToplevelWindowTilingState { -+ WindowNoState = 0, -+ WindowTiledLeft = 1, -+ WindowTiledRight = 2, -+ WindowTiledTop = 4, -+ WindowTiledBottom = 8 -+ }; -+ Q_DECLARE_FLAGS(ToplevelWindowTilingStates, ToplevelWindowTilingState) -+ - QWaylandWindow(QWindow *window, QWaylandDisplay *display); - ~QWaylandWindow() override; - -@@ -145,6 +154,9 @@ public: - void handleContentOrientationChange(Qt::ScreenOrientation orientation) override; - void setOrientationMask(Qt::ScreenOrientations mask); - -+ ToplevelWindowTilingStates toplevelWindowTilingStates() const; -+ void handleToplevelWindowTilingStatesChanged(ToplevelWindowTilingStates states); -+ - void setWindowState(Qt::WindowStates states) override; - void setWindowFlags(Qt::WindowFlags flags) override; - void handleWindowStatesChanged(Qt::WindowStates states); -@@ -257,6 +269,7 @@ protected: - QRegion mMask; - QRegion mOpaqueArea; - Qt::WindowStates mLastReportedWindowStates = Qt::WindowNoState; -+ ToplevelWindowTilingStates mLastReportedToplevelWindowTilingStates = WindowNoState; - - QWaylandShmBackingStore *mBackingStore = nullptr; - QWaylandBuffer *mQueuedBuffer = nullptr; -@@ -293,6 +306,8 @@ private: - friend class QWaylandSubSurface; - }; - -+Q_DECLARE_OPERATORS_FOR_FLAGS(QWaylandWindow::ToplevelWindowTilingStates) -+ - inline QIcon QWaylandWindow::windowIcon() const - { - return mWindowIcon; -diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -index d7d0ddf..2c6e84b 100644 ---- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -@@ -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(m_pending.states); - - if (m_pending.size.isEmpty()) { -@@ -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; -+ m_toplevelStates = QWaylandWindow::WindowNoState; - - for (size_t i = 0; i < numStates; i++) { - switch (xdgStates[i]) { -@@ -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; -+ case XDG_TOPLEVEL_STATE_TILED_LEFT: -+ m_toplevelStates |= QWaylandWindow::WindowTiledLeft; -+ break; -+ case XDG_TOPLEVEL_STATE_TILED_RIGHT: -+ m_toplevelStates |= QWaylandWindow::WindowTiledRight; -+ break; -+ case XDG_TOPLEVEL_STATE_TILED_TOP: -+ m_toplevelStates |= QWaylandWindow::WindowTiledTop; -+ break; -+ case XDG_TOPLEVEL_STATE_TILED_BOTTOM: -+ m_toplevelStates |= QWaylandWindow::WindowTiledBottom; -+ break; - default: - break; - } -@@ -451,7 +465,7 @@ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) - } - - QWaylandXdgShell::QWaylandXdgShell(QWaylandDisplay *display, uint32_t id, uint32_t availableVersion) -- : QtWayland::xdg_wm_base(display->wl_registry(), id, qMin(availableVersion, 1u)) -+ : QtWayland::xdg_wm_base(display->wl_registry(), id, qMin(availableVersion, 2u)) - , m_display(display) - { - 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 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 @@ - - #include - #include -+#include - - #include - #include -@@ -69,7 +70,6 @@ class QWindow; - namespace QtWaylandClient { - - class QWaylandDisplay; --class QWaylandWindow; - class QWaylandInputDevice; - class QWaylandXdgShell; - -@@ -123,6 +123,7 @@ private: - QSize size = {0, 0}; - Qt::WindowStates states = Qt::WindowNoState; - } m_pending, m_applied; -+ QWaylandWindow::ToplevelWindowTilingStates m_toplevelStates = QWaylandWindow::WindowNoState; - QSize m_normalSize; - - QWaylandXdgSurface *m_xdgSurface = nullptr; diff --git a/qtwayland-decoration-support-backports-from-qt6.patch b/qtwayland-decoration-support-backports-from-qt6.patch deleted file mode 100644 index fa8ae9e..0000000 --- a/qtwayland-decoration-support-backports-from-qt6.patch +++ /dev/null @@ -1,234 +0,0 @@ -diff --git a/src/client/qwaylandabstractdecoration_p.h b/src/client/qwaylandabstractdecoration_p.h -index 81c8e177..61cbde77 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 - Q_OBJECT - Q_DECLARE_PRIVATE(QWaylandAbstractDecoration) - public: -+ enum MarginsType { -+ Full, -+ ShadowsExcluded, -+ ShadowsOnly -+ }; -+ - QWaylandAbstractDecoration(); - ~QWaylandAbstractDecoration() override; - -@@ -91,7 +97,8 @@ public: - void update(); - bool isDirty() const; - -- virtual QMargins margins() const = 0; -+ virtual QMargins margins(MarginsType marginsType = Full) const = 0; -+ - QWindow *window() const; - const QImage &contentImage(); - -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index bd70f4af..0e819235 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -380,6 +380,16 @@ void QWaylandWindow::setGeometry(const QRect &rect) - void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset) - { - QMargins margins = frameMargins(); -+ -+ // Exclude shadows from margins once they are excluded from window geometry -+ // 1) First resizeFromApplyConfigure() call will have sizeWithMargins equal to surfaceSize() -+ // which has full margins (shadows included). -+ // 2) Following resizeFromApplyConfigure() calls should have sizeWithMargins equal to -+ // windowContentGeometry() which excludes shadows, therefore in this case we have to -+ // exclude them too in order not to accidentally apply smaller size to the window. -+ if (mWindowDecoration && (sizeWithMargins != surfaceSize())) -+ margins = mWindowDecoration->margins(QWaylandAbstractDecoration::ShadowsExcluded); -+ - 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 - */ - QRect QWaylandWindow::windowContentGeometry() const - { -- return QRect(QPoint(), surfaceSize()); -+ QMargins shadowMargins; -+ -+ if (mWindowDecoration) -+ shadowMargins = mWindowDecoration->margins(QWaylandAbstractDecoration::ShadowsOnly); -+ -+ return QRect(QPoint(shadowMargins.left(), shadowMargins.top()), surfaceSize().shrunkBy(shadowMargins)); - } - - /*! -@@ -1079,6 +1094,21 @@ bool QWaylandWindow::setMouseGrabEnabled(bool grab) - return true; - } - -+QWaylandWindow::ToplevelWindowTilingStates QWaylandWindow::toplevelWindowTilingStates() const -+{ -+ return mLastReportedToplevelWindowTilingStates; -+} -+ -+void QWaylandWindow::handleToplevelWindowTilingStatesChanged(ToplevelWindowTilingStates states) -+{ -+ 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 ---- a/src/client/qwaylandwindow_p.h -+++ b/src/client/qwaylandwindow_p.h -@@ -95,6 +95,15 @@ public: - Vulkan - }; - -+ enum ToplevelWindowTilingState { -+ WindowNoState = 0, -+ WindowTiledLeft = 1, -+ WindowTiledRight = 2, -+ WindowTiledTop = 4, -+ WindowTiledBottom = 8 -+ }; -+ Q_DECLARE_FLAGS(ToplevelWindowTilingStates, ToplevelWindowTilingState) -+ - QWaylandWindow(QWindow *window, QWaylandDisplay *display); - ~QWaylandWindow() override; - -@@ -145,6 +154,10 @@ 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: - QRegion mMask; - QRegion mOpaqueArea; - Qt::WindowStates mLastReportedWindowStates = Qt::WindowNoState; -+ ToplevelWindowTilingStates mLastReportedToplevelWindowTilingStates = WindowNoState; - - QWaylandShmBackingStore *mBackingStore = nullptr; - QWaylandBuffer *mQueuedBuffer = nullptr; -@@ -292,6 +306,8 @@ private: - friend class QWaylandSubSurface; - }; - -+Q_DECLARE_OPERATORS_FOR_FLAGS(QWaylandWindow::ToplevelWindowTilingStates) -+ - inline QIcon QWaylandWindow::windowIcon() const - { - return mWindowIcon; -diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp -index e75fda3c..72dda67f 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 - public: - QWaylandBradientDecoration(); - protected: -- QMargins margins() const override; -+ QMargins margins(MarginsType marginsType = Full) const override; - void paint(QPaintDevice *device) override; - bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) override; - bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) override; -@@ -129,8 +129,11 @@ QRectF QWaylandBradientDecoration::minimizeButtonRect() const - (margins().top() - BUTTON_WIDTH) / 2, BUTTON_WIDTH, BUTTON_WIDTH); - } - --QMargins QWaylandBradientDecoration::margins() const -+QMargins QWaylandBradientDecoration::margins(MarginsType marginsType) const - { -+ if (marginsType == ShadowsOnly) -+ return QMargins(); -+ - return QMargins(3, 30, 3, 3); - } - -diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -index 7d33dabd..cf7eb4e9 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; - -+ m_xdgSurface->m_window->handleToplevelWindowTilingStatesChanged(m_toplevelStates); - m_xdgSurface->m_window->handleWindowStatesChanged(statesWithoutActive); - - if (m_pending.size.isEmpty()) { -@@ -126,6 +127,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; -+ m_toplevelStates = QWaylandWindow::WindowNoState; - - 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 - case XDG_TOPLEVEL_STATE_FULLSCREEN: - m_pending.states |= Qt::WindowFullScreen; - break; -+ case XDG_TOPLEVEL_STATE_TILED_LEFT: -+ m_toplevelStates |= QWaylandWindow::WindowTiledLeft; -+ break; -+ case XDG_TOPLEVEL_STATE_TILED_RIGHT: -+ m_toplevelStates |= QWaylandWindow::WindowTiledRight; -+ break; -+ case XDG_TOPLEVEL_STATE_TILED_TOP: -+ m_toplevelStates |= QWaylandWindow::WindowTiledTop; -+ break; -+ case XDG_TOPLEVEL_STATE_TILED_BOTTOM: -+ m_toplevelStates |= QWaylandWindow::WindowTiledBottom; -+ break; - default: - break; - } -@@ -457,7 +471,7 @@ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) - } - - QWaylandXdgShell::QWaylandXdgShell(QWaylandDisplay *display, uint32_t id, uint32_t availableVersion) -- : QtWayland::xdg_wm_base(display->wl_registry(), id, qMin(availableVersion, 1u)) -+ : QtWayland::xdg_wm_base(display->wl_registry(), id, qMin(availableVersion, 2u)) - , m_display(display) - { - 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 ---- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h -+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h -@@ -58,6 +58,7 @@ - - #include - #include -+#include - - #include - #include -@@ -69,7 +70,6 @@ class QWindow; - namespace QtWaylandClient { - - class QWaylandDisplay; --class QWaylandWindow; - class QWaylandInputDevice; - class QWaylandXdgShell; - -@@ -123,6 +123,7 @@ private: - QSize size = {0, 0}; - Qt::WindowStates states = Qt::WindowNoState; - } m_pending, m_applied; -+ QWaylandWindow::ToplevelWindowTilingStates m_toplevelStates = QWaylandWindow::WindowNoState; - QSize m_normalSize; - - QWaylandXdgSurface *m_xdgSurface = nullptr; diff --git a/sources b/sources index 248404c..380b08b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwayland-everywhere-opensource-src-5.15.3.tar.xz) = 0a9768282170709050490fb1b9daef59c21c8b5c4785f56a452d7954ffb6f016ec836022693941c99c5c10b2c3c55c75ba37fdad09dd1e0cde627f8b87b90c89 +SHA512 (qtwayland-everywhere-opensource-src-5.15.4.tar.xz) = 58ae262f7aa0455fb577a36fe9413a969398a2043160642501bac064d6fbc3280f76aa566e62b9d73c67a8c3606849b1b97bcb9b0250d26c269ec921112f40e4