Bug 375993 - The 'Show Desktop' action doesn't restore focus
Summary: The 'Show Desktop' action doesn't restore focus
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.8.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D6420
Keywords: reproducible
: 374954 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-04 10:33 UTC by razrfalcon
Modified: 2021-03-11 19:18 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.10.4
mgraesslin: Wayland+
mgraesslin: X11+
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description razrfalcon 2017-02-04 10:33:47 UTC
I'm using right bottom corner as Show Desktop action via System Settings -> Desktop Behavior -> Screen Edges.

Starting from 5.8(probably) if we move mouse to the corner twice, once to hide windows and once to show them again, focus will be still on the desktop and not on application. So when I start typing - KRunner will appear.
Comment 1 Tony 2017-02-11 03:25:48 UTC
I have the same setup as you, cn't reproduce on neon unstable. Maybe is already fixed?
Comment 2 Kai Uwe Broulik 2017-02-11 09:24:02 UTC
I can reproduce this on git master.
Comment 3 Bastian Beischer 2017-03-19 15:05:37 UTC
I can also confirm this. Also bug 374954 is a duplicate, I think.
Comment 4 Nate Graham 2017-06-16 22:25:43 UTC
*** Bug 374954 has been marked as a duplicate of this bug. ***
Comment 5 Martin Flöser 2017-06-27 04:57:01 UTC
Given the code in question the problem must exist at least since 5.3 maybe longer.
Comment 6 Martin Flöser 2017-06-27 19:20:03 UTC
Some investigation results: the problem only exists if there is a desktop window. If there is no desktop window, show desktop properly restores focus. This behavior matches the code which requests focus on the desktop, but does not try to restore.
Comment 7 Martin Flöser 2017-06-28 16:05:41 UTC
Possible patch at: https://phabricator.kde.org/D6420
Comment 8 Martin Flöser 2017-07-01 06:20:45 UTC
Git commit 113be5fac81a4b546e2a1b272451f50e777bdcb5 by Martin Flöser.
Committed on 01/07/2017 at 06:20.
Pushed by graesslin into branch 'Plasma/5.10'.

Restore active client after ending showing desktop

Summary:
Showing desktop requests focus on the desktop window. This means the
active window is reset. When ending showing desktop the state was not
restored.

This change addresses this problem by requesting focus to the best
window.
FIXED-IN: 5.10.4

Test Plan: New autotest and manual testing

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

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

M  +1    -0    autotests/integration/CMakeLists.txt
A  +128  -0    autotests/integration/showing_desktop_test.cpp     [License: GPL (v2)]
M  +7    -1    workspace.cpp

https://commits.kde.org/kwin/113be5fac81a4b546e2a1b272451f50e777bdcb5