Bug 487922 - Alt-tab sometimes switches to the 2nd last open window instead of last open one.
Summary: Alt-tab sometimes switches to the 2nd last open window instead of last open one.
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 6.0.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-06-02 13:46 UTC by Répási Dávid
Modified: 2024-06-29 21:15 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Répási Dávid 2024-06-02 13:46:05 UTC
SUMMARY
As the title says.

STEPS TO REPRODUCE
1. Press Alt + Tab

OBSERVED RESULT
*Sometimes*, I can't quite put my finger on when exactly, it switches to the 2nd last used window.

EXPECTED RESULT
Always switch to the last used window when pressing alt + tab

SOFTWARE/OS VERSIONS
Linux: 6.9.3
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
I'm running wayland, this also happened in previous versions for me, for sure back till 6.0, but can't quite remember if 5.27 had the issue.
The most annoying part is that it happens seemingly randomly.
Comment 1 David Redondo 2024-06-05 09:39:20 UTC
When this happens does the tab switcher window show up?
Comment 2 Répási Dávid 2024-06-08 19:08:21 UTC
No I do not wait for it to appear, I switch fast, plus I have animation speed set to almost instant (one before that).
Comment 3 RedBearAK 2024-06-29 21:11:13 UTC
I think I've also been seeing this in Fedora with Plasma 6.1.1. I'll switch back to a recently used app group (I have a KWin script that groups together app windows with the same app class, like macOS/GNOME) and instead of the one that was in front previously I'll get the window of that app group that was behind that window, like something did an Alt+Grave right as it switched to the last used window group. 

I've tested the KWin script extensively in several distro types with Plasma 5 and 6, and it has never exhibited this inconsistent stacking behavior before. It normally keeps each app group of windows stacked in the same order until I Alt+Grave to a different in-app window. Seems to be something odd happening in recent Plasma updates. 

There's also a problem with the tab box not fully isolating keyboard input from the app behind the tab box / task switcher dialog, which may or may not be related somehow. 

See here for that bug report: 

https://bugs.kde.org/show_bug.cgi?id=489382
Comment 4 RedBearAK 2024-06-29 21:15:21 UTC
And just before I posted that appears to have been marked as a duplicate of this bug report: 

https://bugs.kde.org/show_bug.cgi?id=484992