From 9490ad028caa799bde357a4d16ed75fe19f5adaf Mon Sep 17 00:00:00 2001 From: Wisbendji Fimerlus Date: Fri, 13 Nov 2026 08:46:39 -0500 Subject: [PATCH] Let the fork's delta merge onto upstream master The daily upstream master preview stops at its first step. The fork's delta has three content conflicts with master, so no candidate is built and the lane says nothing about the 397 master commits past the pin. Each conflict is a line of ours beside a line upstream changed. tilemanager.h: our three forward declarations followed TileModel's, which master removed when it decoupled the tile manager from the tile model (b692d1c8d8). They are in a namespace block of the fork's own now, ahead of upstream's. tiles_test.cpp: our includes sat in upstream's blocks, one beside QAbstractItemModelTester, and our transient check preceded the tester's line in init(); master removed both tester lines. Upstream's include blocks and init() are as upstream has them again. Our includes are in blocks of their own between them, and the check is a test of its own, rootTileIsNotTransient. offscreenquickview.cpp: the baseline set the opacity on the view's QWindow and copied it to the item. Master's fix of the same bug (ff26dc46b3, "effect: Fix sync'ing of OffscreenQuickView opacity") sets and reads the item only: the view has no platform window, so the QWindow's value is never used. The fork takes upstream's two lines. Through the view's setter the item's opacity and what opacity() returns are as before. The QWindow keeps an opacity of 1, and a value written to it directly is no longer what opacity() returns. testOpacity accepted either behaviour and pins this one now; it and the new check in testResynchronizeOpacity fail on the old lines. With the change the preview's merge is clean against master 75175b1045. Signed-off-by: Wisbendji Fimerlus --- .../integration/offscreenquickview_test.cpp | 15 +++---- autotests/integration/tiles_test.cpp | 41 ++++++++++++------- src/effect/offscreenquickview.cpp | 5 +-- src/tiles/tilemanager.h | 14 +++++-- 4 files changed, 46 insertions(+), 29 deletions(-) diff --git a/autotests/integration/offscreenquickview_test.cpp b/autotests/integration/offscreenquickview_test.cpp index d7505a0dd7..b9f37821a5 100644 --- a/autotests/integration/offscreenquickview_test.cpp +++ b/autotests/integration/offscreenquickview_test.cpp @@ -152,15 +152,9 @@ void OffscreenQuickViewTest::testOpacity() view.setOpacity(opacity); QCOMPARE(view.opacity(), opacity); QCOMPARE(item->opacity(), opacity); - // The fork's Plasma/6.8 fix propagates the opacity to the QWindow as well, - // while master's fix (upstream ff26dc46b3) deliberately leaves the platform - // window untouched because QWindow::setOpacity() noops here. Pin whichever - // behavior this build implements, so both branches stay covered. - if (view.window()->opacity() == opacity) { - QCOMPARE(view.window()->opacity(), opacity); - } else { - QCOMPARE(view.window()->opacity(), 1.0); - } + // The opacity is the item's, as in upstream's own fix (ff26dc46b3). The view's QWindow is + // left untouched: it has no platform window, so a value set there is stored and never used. + QCOMPARE(view.window()->opacity(), 1.0); QVERIFY(view.isVisible()); QVERIFY(item->isVisible()); } @@ -174,6 +168,9 @@ void OffscreenQuickViewTest::testResynchronizeOpacity() QVERIFY(item); view.setOpacity(0.5); view.window()->setOpacity(0.25); + // A value written to the QWindow does not become the view's opacity. + QCOMPARE(view.opacity(), 0.5); + QCOMPARE(item->opacity(), 0.5); view.setOpacity(0.25); QCOMPARE(item->opacity(), 0.25); QCOMPARE(view.opacity(), 0.25); diff --git a/autotests/integration/tiles_test.cpp b/autotests/integration/tiles_test.cpp index 3cdffbfa13..8e5615bdde 100644 --- a/autotests/integration/tiles_test.cpp +++ b/autotests/integration/tiles_test.cpp @@ -8,32 +8,29 @@ */ #include "kwin_wayland_test.h" -#include "atoms.h" #include "core/output.h" #include "pointer_input.h" -#include "rules.h" #include "tiles/tilemanager.h" -#include "tiles/transientplacementwriter.h" -#include "tiles/transienttilecontroller.h" -#include "utils/gravity.h" #include "wayland_server.h" #include "window.h" #include "workspace.h" -#include "xdgshellwindow.h" -#if KWIN_BUILD_X11 +// The fork's includes, in blocks of their own between upstream's: a line of ours inside one +// of upstream's blocks is a merge conflict with every edit beside it. +#include "atoms.h" +#include "rules.h" +#include "tiles/transientplacementwriter.h" +#include "tiles/transienttilecontroller.h" +#include "utils/gravity.h" +#include "xdgshellwindow.h" +#if KWIN_BUILD_X11 // the fork's X11 rows #include "utils/xcbutils.h" -#include "x11window.h" -#include -#include -#include -#include #endif #include +#include #include #include -#include #include #include @@ -42,6 +39,14 @@ #include #include +#if KWIN_BUILD_X11 +#include "x11window.h" +#include +#include +#endif + +#include + Q_DECLARE_METATYPE(KWin::QuickTileMode) Q_DECLARE_METATYPE(KWin::MaximizeMode) @@ -182,6 +187,7 @@ private Q_SLOTS: void transientPublicMutations_data(); void transientPublicMutations(); void transientRefusesDirectManagement(); + void rootTileIsNotTransient(); void compatibilityAssignmentRefusal_data(); void compatibilityAssignmentRefusal(); void compatibilityAssignmentAcrossDesktops_data(); @@ -270,7 +276,6 @@ void TilesTest::init() m_output = workspace()->activeOutput(); m_tileManager = workspace()->tileManager(m_output); m_rootTile = workspace()->rootTile(m_output); - QVERIFY(!m_rootTile->isTransient()); QAbstractItemModelTester(m_tileManager->model(), QAbstractItemModelTester::FailureReportingMode::QtTest); VirtualDesktopManager::self()->setCount(3); @@ -437,6 +442,14 @@ void TilesTest::transientRefusesDirectManagement() QVERIFY(silent); } +void TilesTest::rootTileIsNotTransient() +{ + // The fixture every row starts from: init() leaves an ordinary root tile. A test of its + // own, so that upstream's init() stays as upstream has it. + QVERIFY(m_rootTile); + QVERIFY(!m_rootTile->isTransient()); +} + void TilesTest::compatibilityAssignmentRefusal_data() { QTest::addColumn("propertyWrite"); diff --git a/src/effect/offscreenquickview.cpp b/src/effect/offscreenquickview.cpp index 1e6a34fd53..77f19b613c 100644 --- a/src/effect/offscreenquickview.cpp +++ b/src/effect/offscreenquickview.cpp @@ -558,13 +558,12 @@ Rect OffscreenQuickView::geometry() const void OffscreenQuickView::setOpacity(qreal opacity) { - d->m_view->setOpacity(opacity); - d->m_item->setOpacity(d->m_view->opacity()); + d->m_item->setOpacity(opacity); } qreal OffscreenQuickView::opacity() const { - return d->m_view->opacity(); + return d->m_item->opacity(); } bool OffscreenQuickView::hasAlphaChannel() const diff --git a/src/tiles/tilemanager.h b/src/tiles/tilemanager.h index ac789a2445..5931016807 100644 --- a/src/tiles/tilemanager.h +++ b/src/tiles/tilemanager.h @@ -26,16 +26,24 @@ class QTimer; +// The transient tiling's types, declared in a namespace block of the fork's own: a line of +// ours among upstream's declarations below is a merge conflict with every edit beside it. namespace KWin { -class LogicalOutput; -class Tile; -class TileModel; class TransientTile; class TransientTileController; class Workspace; +} + +namespace KWin +{ + +class LogicalOutput; +class Tile; +class TileModel; + /** * Custom tiling zones management per output. */