Bug 478383 - Lowering a window with transient or a transient window is broken on wayland
Summary: Lowering a window with transient or a transient window is broken on wayland
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: git master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2023-12-11 03:15 UTC by Jarek Janik
Modified: 2025-03-07 19:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarek Janik 2023-12-11 03:15:27 UTC
SUMMARY
Workspace::lowerWindow() method uses X11 specific code path for selecting members of window hierarchy, that code path returns empty list - so only the lowered window actually gets lowered:
- when this window is a parent of hierarchy then it leave this hierarchy dangling
- when this window is a transient - it only gets lowered as low as possible - so it ends right above the parent window of the hierarchy

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.81.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Comment 1 Jarek Janik 2023-12-11 03:50:45 UTC
MR with fix is here:
https://invent.kde.org/plasma/kwin/-/merge_requests/4779
Comment 2 Jarek Janik 2024-12-10 02:06:22 UTC
New MR:
https://invent.kde.org/plasma/kwin/-/merge_requests/6882
Comment 3 Zamundaaa 2025-03-07 17:29:59 UTC
Git commit 1df917fae4bc744e1508b4e95e8d9a7b521a00da by Xaver Hugl, on behalf of Jarek Janik.
Committed on 07/03/2025 at 15:08.
Pushed by zamundaaa into branch 'master'.

layers: fix stacking issues in Workspace::lowerWindow

Workspace::lowerWindow() method had issues when handling window
hierarchies (different on X11 and on wayland, see BUGS below).

This patch unifies code paths for both X11 and wayland in lowerWindow()
method, fixing the aforementioned bugs.
Related: bug 478382

M  +19   -14   src/layers.cpp

https://invent.kde.org/plasma/kwin/-/commit/1df917fae4bc744e1508b4e95e8d9a7b521a00da
Comment 4 Zamundaaa 2025-03-07 18:53:27 UTC
Git commit dc3e489472431789ded4ad5b9ab36c466118d5df by Xaver Hugl, on behalf of Jarek Janik.
Committed on 07/03/2025 at 18:15.
Pushed by zamundaaa into branch 'Plasma/6.3'.

layers: fix stacking issues in Workspace::lowerWindow

Workspace::lowerWindow() method had issues when handling window
hierarchies (different on X11 and on wayland, see BUGS below).

This patch unifies code paths for both X11 and wayland in lowerWindow()
method, fixing the aforementioned bugs.
Related: bug 478382
(cherry picked from commit 1df917fae4bc744e1508b4e95e8d9a7b521a00da)

M  +19   -14   src/layers.cpp

https://invent.kde.org/plasma/kwin/-/commit/dc3e489472431789ded4ad5b9ab36c466118d5df