Bug 368673 - [wayland] Alt+tab doesn't show minimized wayland windows in account
Summary: [wayland] Alt+tab doesn't show minimized wayland windows in account
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-12 05:28 UTC by Bhushan Shah
Modified: 2016-09-12 11:15 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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