Bug 392289 - After activating "Show desktop," clicking on window in task manager does not get focus properly
Summary: After activating "Show desktop," clicking on window in task manager does not ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression, usability
: 419156 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-25 04:03 UTC by battaglia01
Modified: 2022-09-08 04:59 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description battaglia01 2018-03-25 04:03:48 UTC
I'm on Plasma 5.12.3 in KDE Neon.

If I activate Show Desktop (Meta-D on my setup), all windows are swiped to the corners (but not minimized).

If I then click on a program in the task manager that is open, that window does not get focus. Instead, Show Desktop un-does itself, but leaves the last active window focused.

A simple way to reproduce is as follows:

1. Open a program, let's say Firefox. Keep it non-minimized
2. Open a different program, let's say Dolphin. Keep this non-minimized
3. Give Dolphin focus
4. Hit Ctrl-F12 to show desktop
5. Now click on the Firefox icon in the task manager
6. Windows come back, Dolphin still has focus.

There are some strange exceptions to this behavior:
1. If Dolphin is active, but Firefox is minimized, then when you click Firefox after showing desktop, Firefox *does* get focus (and un-minimizes).
2. If Dolphin is active and Firefox isn't open at all, just "pinned" to the task manager, then clicking Firefox opens the program and gives it focus.

I've tried this with both the icons-only task manager and the regular one. This should be changed so that clicking a window gives it focus no matter what.
Comment 1 battaglia01 2018-03-25 04:04:39 UTC
I put this as "general" for now as I wasn't sure if it should go to the Task Manager widget, or the Icons-Only Task Manager widget, or somewhere else. Please feel free to change.
Comment 2 Alexander Mentyu 2018-03-30 16:22:06 UTC
Can reproduce the issue in:

Plasma: 5.12.3
Apps: 17.12.3
Frameworks: 5.44.0
Qt: 5.10.1
Kernel: 4.14.27-1-MANJARO
OS: Netrunner Rolling
Comment 3 Patrick Silva 2018-04-01 00:59:26 UTC
The same behavior can be repdoduced with "minimize all windows" widget on neon dev unstable under X11.
Comment 4 Alexander Kandaurov 2020-06-04 21:09:25 UTC
Looks like this bug belongs to kwin and was introduced by a fix to bug 375993. When calling Workspace::activateClient(), Workspace::setShowingDesktop() is called and with the code from that fix added it ends up activating a wrong window.
Comment 5 Alexander Kandaurov 2020-06-04 21:10:51 UTC
*** Bug 419156 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-03-11 19:18:21 UTC
Can confirm. Would you like to submit a fix, Alexander?
Comment 7 Nate Graham 2022-09-08 04:59:54 UTC
This is fixed now.