Summary: | Scripting: Undocumented breaking change in Maximized windows behaviour | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Alik Aslanyan <inline0> |
Component: | Quick Tiling | Assignee: | Alik Aslanyan <inline0> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | inline0, nate, notmart |
Priority: | NOR | Keywords: | regression |
Version: | 6.1.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/634e8be469c94763940f938fa446daee552b0cdf | Version Fixed In: | |
Sentry Crash Report: |
Description
Alik Aslanyan
2024-06-29 23:13:48 UTC
Correction, last comment about Polonium internals seems to be incorrect For some reason link from invent.kde.org isn't working. I meant this change in unit testing. // window is now set to maximised QCOMPARE(maximizeChangedSpy.count(), 1); QCOMPARE(window->maximizeMode(), MaximizeFull); - QCOMPARE(window->tile(), nullptr); Result of original PR bisection af7f52e38bb09adab9c0bf572c996a11589a6a25 is the first bad commit commit af7f52e38bb09adab9c0bf572c996a11589a6a25 Author: Marco Martin <notmart@gmail.com> Date: Tue Mar 26 17:02:41 2024 +0100 prototype of double buffered quick tile mode autotests/integration/kwin_wayland_test.h | 15 ++++++++++++++- autotests/integration/quick_tiling_test.cpp | 52 ++++++++++++++++++++++++++++++++++++++++------------ autotests/integration/test_helpers.cpp | 12 ++++++++++++ src/tiles/quicktile.cpp | 4 ++++ src/window.cpp | 39 +++++++++++++++++++++++++++------------ src/window.h | 2 ++ src/xdgshellwindow.cpp | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 7 files changed, 149 insertions(+), 34 deletions(-) What happens in Polonium as is follows. 1) User maximizes the Window 2) Polonium while receiving maximizedChanged untilies the window, by removing it from the tile 3) KWin ignores removed tile and reinserts it somewhere in the code. 4) Polonium receives TileChanged with non-NULL and freaks out Previously it was as this 1) User maximizes the Window 2) Polonium while receiving maximizedChanged untilies the window, by removing it from the tile 3) Polonium receives TileChanged with NULL This is more correct description of the logic issue here. When script decides to remove window from tile, script shouldn't put it again Will be fixed by https://invent.kde.org/plasma/kwin/-/merge_requests/6023, if that's merged. Git commit 3b34e9309b166072f73898017b88208a2f04b947 by Vlad Zahorodnii, on behalf of Alik Aslanyan. Committed on 09/07/2024 at 17:24. Pushed by vladz into branch 'master'. tiling: Don't put maximized windows in tile After !5532 existing behavior in public scripting API was changed for maximized Windows. Maximized Windows didn't have a tile on purpose. This behaviour was changed, as after refactoring separate members for storing QuickTileMode in Window and tile itself were unified Previously QuickTileMode::Maximize was only set in the Window itself in m_quickTileMode, while tile itself was removed (by setTile(nullptr)). Current QuickTileMod for current Window isn't part of public scripting API, so it's okay to break it. This restores compatability with scripts created for KWin 6.0.5 and earlier Signed-off-by: Alik Aslanyan <inline0@pm.me> M +15 -3 autotests/integration/move_resize_window_test.cpp M +47 -19 autotests/integration/quick_tiling_test.cpp M +1 -5 src/x11window.cpp M +1 -9 src/xdgshellwindow.cpp https://invent.kde.org/plasma/kwin/-/commit/3b34e9309b166072f73898017b88208a2f04b947 Git commit 634e8be469c94763940f938fa446daee552b0cdf by Vlad Zahorodnii. Committed on 15/07/2024 at 07:55. Pushed by vladz into branch 'Plasma/6.1'. tiling: Don't put maximized windows in tile After !5532 existing behavior in public scripting API was changed for maximized Windows. Maximized Windows didn't have a tile on purpose. This behaviour was changed, as after refactoring separate members for storing QuickTileMode in Window and tile itself were unified Previously QuickTileMode::Maximize was only set in the Window itself in m_quickTileMode, while tile itself was removed (by setTile(nullptr)). Current QuickTileMod for current Window isn't part of public scripting API, so it's okay to break it. This restores compatability with scripts created for KWin 6.0.5 and earlier Signed-off-by: Alik Aslanyan <inline0@pm.me> (cherry picked from commit 3b34e9309b166072f73898017b88208a2f04b947) Co-authored-by: Alik Aslanyan <inline0@pm.me> M +15 -3 autotests/integration/move_resize_window_test.cpp M +47 -19 autotests/integration/quick_tiling_test.cpp M +1 -5 src/x11window.cpp M +1 -9 src/xdgshellwindow.cpp https://invent.kde.org/plasma/kwin/-/commit/634e8be469c94763940f938fa446daee552b0cdf |