Created attachment 128462 [details] Link to video showing the issue SUMMARY If the thumbnail grid is focused on the desktop while another application is launched, releasing Alt+Tab focuses the desktop instead of the application. Holding Alt+Tab again will show other running applications, but releasing it will always focus again on the desktop. The only way to revert this is to close all applications, then hold and release Alt+Tab. STEPS TO REPRODUCE Please see the attachment. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.70.0 Qt Version: 5.14.2 Kernel Version: 5.6.11-arch1-1 OS Type: 64-bit Windowing System: Wayland ADDITIONAL INFORMATION I am using the KwinFT branch of Kwin. I assumed this would be reproducible on the main branch, too. Please correct me if I'm wrong.
Direct link to OP's attachment: https://drive.google.com/file/d/1136PK_QmDzPcICjOsX09eQo1hZb3jhlf/view I was able to reproduce this bug after turning back on "Show selected window". It has "showing desktop" selected, then the "show desktop" item is replaced with "app" as we don't have "Include 'show desktop' icon" checked. The currentIndex does not change. Even if we check "Include 'show desktop' icon", when the app appears the window is selected in the tabbox but the show desktop effect is still active. Because currentIndex=0 still. If we hit tab twice to select 'show desktop' then select the app then all is well. This is because currentIndex changed. So we need to detect when the data at currentIndex is changed (eg: 'show desktop' => 'app') and cause it to https://github.com/KDE/kdeplasma-addons/blob/master/windowswitchers/thumbnail_grid/contents/ui/main.qml
I just filed bug #423008, which has many similarities, except it can be triggered more easily.
This bug was reported against an outdated version of KWin. We have made many changes since the. If the issue persists in newer versions can you reopen the bug report updating the version number.