Bug 429319 - Task switcher with options "stacking order" + "one window per app" not behaving nicely
Summary: Task switcher with options "stacking order" + "one window per app" not behavi...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 5.20.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-18 18:31 UTC by Neil
Modified: 2020-11-22 02:17 UTC (History)
2 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 Neil 2020-11-18 18:31:09 UTC
SUMMARY

There was something unexpected going on when I was aiming for a certain result from the task switcher.

"If Only one window per application is selected then only the last used instance of an application is contained in the list. Switching to other instances is possible only via the panel then." https://docs.kde.org/trunk5/en/kde-workspace/kcontrol/kwintabbox/index.html

When sort order is "Recently used" this works correctly

When sort order is "Stacking order" this does not work as expected

When sort order is "Stacking order": a PREVIOUSLY used instance of the application is contained in the list.

Why this matters:
- Alt+Tab to walk through applications (as if groups)
- Alt+` to walk through instances of the current application

Alt+Tab should then not display a different window of the current application, only Alt+` should.

STEPS TO REPRODUCE
1. Under System Settings > Window Management > Task Switcher
2. Sort order: choose "stacking order"
3. Check "only one window per application"
4. Open 2 chrome windows
5. Open 2 terminal windows
6. Open 2 firefox windows
7. Make sure each window has something recognizable 

OBSERVED RESULT
The Alt+Tab list shows all 3 applications, but not the last used.

What is displayed is the bottom of the stack.

And, when Alt+` is used, the next time you press Alt+Tab you see the other window of the current application (which should definitely not happen).

EXPECTED RESULT
With "one window per application" Alt-Tab should never switch to another window of the same application.
Alt-Tab should just cycle the top of the stack
Alt-` should bring stuff up from underneath

SOFTWARE/OS VERSIONS
Linux: Arch 5.9.8-zen1-1-zen
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION

I hope this was clear enough :-)

I understand why this is happening, but "stacking order" + "one window per app" together should work differently i.e.: it should work like in the docs: "If Only one window per application is selected then only the last used instance of an application is contained in the list."
Comment 1 Thiago Sueto 2020-11-22 02:17:36 UTC
I can confirm this on current Plasma from master. I'm not sure if the mistake is on KWin or on the documentation, though.

If it's expected behavior from KWin, then the documentation is wrong, otherwise this is a bug in KWin.

Personally I'd also expect Alt+Tab to return to the previously used window. As an example:

I open a KWrite window to make some notes on ingredients to purchase, open another KWrite window, then I open a browser to copy a recipe, then I'd expect Alt+Tab to go back to the new, empty KWrite window to paste the content I copied since I opened it last. If instead it cycled to the KWrite window with ingredients, I'd need to Alt+` to go back to the window I last opened (the empty one).