Bug 362239

Summary: Focus does not return to earlier focussed window while returning from 'Show Desktop'
Product: [Plasma] plasmashell Reporter: deshmukh.sandip
Component: Application Dashboard widgetAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: bastian.beischer, bshah, july.tikh, nate
Priority: NOR    
Version First Reported In: 5.5.5   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: showdesktop.patch

Description deshmukh.sandip 2016-04-25 12:35:52 UTC
When I do 'Show Desktop' (Ctrl-F12), all windows disappear and the desktop with widgets is shown.

When I return (press Ctrl-F12 again), all windows are shows just as they were when I went to the desktop --- except that the window that was focussed earlier, is not focussed.

Anything I type goes to krunner (it starts on its own).

Reproducible: Always

Steps to Reproduce:
1. Working in Kwrite (so it has the focus), two other windows are open but are not focussed.
2. Ctrl-F12 - windows disappear. Desktop is shown
3. Ctrl-F12 - windows reappear. But Kwrite is not focussed.
4. Start typing, krunner opens and gets all the keystrokes

Actual Results:  
On coming back from 'Show desktop' focus is lost from the window that was focussed earlier.

If you start typing, krunner starts on its own and grabs all keystrokes.

Expected Results:  
The window that was focussed earlier should get the focus back.
Comment 1 Bastian Beischer 2016-10-05 14:41:28 UTC
This bug still exists in Plasma 5.8.0 LTS. It would be nice to see this fixed.
Comment 2 July Tikhonov 2017-07-02 08:11:49 UTC
Created attachment 106410 [details]
showdesktop.patch

I had the same problem (Gentoo, Plasma 5.8.6).

Attached patch for kde-plasma/kwin-5.8.6 fixes the problem for me.

(Patch note: I just stuck together some bits of code from elsewhere in file. Could mess something else.)
Comment 3 Nate Graham 2020-01-13 03:25:14 UTC
This no longer appears to be an issue today.