Bug 484960

Summary: After switching activities kwin gets confused about window ordering
Product: [Plasma] kwin Reporter: zobal.ondrej
Component: activitiesAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: Breadly
Priority: NOR    
Version First Reported In: 6.0.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Demonstration of the bad behaviour

Description zobal.ondrej 2024-04-03 08:38:19 UTC
Created attachment 168080 [details]
Demonstration of the bad behaviour

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
After switching to a non-default activity and back, kwin looses track of z-indexes of overlapping windows. A window will appear at the top and yet be completely click-through with its inputs being captured by the window under it. Focusing a different window will result in a nonsensical reordering of z-indexes of overlapping windows. The only fix I found is restarting the session.

STEPS TO REPRODUCE (as seen in attached video)
1. I demonstrate normal behaviour of selecting focusing windows on the default activity (orange wallpaper)
2. I switch to an alternative activity (blue wallpaper) and demonstrate that window focus still works well
3. I switch back to the default activity (orange wallpaper) and demonstrate that windows are now no longer being focused properly.

OBSERVED RESULT
Windows at the top don't capture mouse input, cannot be clicked even when clicking its window decoration, focused window often does not appear at the top.

EXPECTED RESULT
Window at the top always captures mouseclicks and mouse hover.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240329
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.1-1-default (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5500U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 82HU
System Version: IdeaPad Flex 5 14ALC05