Bug 368673

Summary: [wayland] Alt+tab doesn't show minimized wayland windows in account
Product: [Plasma] kwin Reporter: Bhushan Shah <bshah>
Component: tabboxAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Bhushan Shah 2016-09-12 05:28:30 UTC
Alt+Tab switcher normally takes all minimzed windows in account, but somehow it is broken recently.

Steps to reproduce

1. Open konsole and minimize it
2. Open Google chrome and minimize it
3. Alt+tab

Actual results

Alt+tab switcher switches to google chrome window and doesn't show konsole window as if it is not there

Expected results

Alt+tab switcher should show Konsole window in it as well.
Comment 1 Martin Flöser 2016-09-12 07:44:20 UTC
The reason for this (given my investigation is)
1. TabBox excludes windoes with !wantsTabFocus()
2. AbstractClient::wantsTabFocus delegates to wantsInput
3. ShellClient::wantsInput delegates to acceptsFocus
4. ShellClient::acceptsFocus delgates to isShown
5. ShellClient::isShown has a !isMinimized()

Thus minimized wayland windows do not want tab focus.
Comment 2 Martin Flöser 2016-09-12 08:01:59 UTC
Git commit ab68697fe59d8649b2db2771df9b1da04b60543a by Martin Gräßlin.
Committed on 12/09/2016 at 08:01.
Pushed by graesslin into branch 'master'.

[autotests/integration] Extend TestShellClient::tetsMinimizeActiveWindow

Adds QEXPECT_FAIL cases for wantsInput and wantsTabFocus of a minimized
window.

M  +11   -0    autotests/integration/shell_client_test.cpp

http://commits.kde.org/kwin/ab68697fe59d8649b2db2771df9b1da04b60543a
Comment 3 Martin Flöser 2016-09-12 11:15:19 UTC
Git commit 9b32615ab4d59566172ace706acf6eb69c64bef9 by Martin Gräßlin.
Committed on 12/09/2016 at 11:14.
Pushed by graesslin into branch 'master'.

Don't bind ShellClient::acceptsFocus to whether the window is shown

Summary:
A not shown window may accept focus (e.g. when minimized). Given that
the condition was wrong and broke when making minimized windows not
shown.

This change takes the idea of not passing focus to a closing or unmapped
window directly into acceptsFocus. Which also means that this condition
now works for xdg_shell windows.

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2745

M  +0    -2    autotests/integration/shell_client_test.cpp
M  +9    -2    shell_client.cpp

http://commits.kde.org/kwin/9b32615ab4d59566172ace706acf6eb69c64bef9