Bug 428878

Summary: Regression: Window focus loss after desktop switch
Product: [Plasma] kwin Reporter: dezifit
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 5.20.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description dezifit 2020-11-09 10:49:27 UTC
SUMMARY
Switching the virtual desktop randomly causes the active window(s) to loose input focus. Unrelated to setting of "Focus stealing prevention".

STEPS TO REPRODUCE
1. Prepare setting with 2 or more virtual desktops
2. Assign one or more windows to each desktop
3. Set (keyboard) input focus to one window
4. Switch virtual desktop and immediately switch it back (with keyboard shortcut)

OBSERVED RESULT
Most of the time the window with input focus before has the focus after a switch cycle. Quite often it has not. 

EXPECTED RESULT
Input focus should stay reliable on the previously selected window after the virtual desktop is switched back.

SOFTWARE/OS VERSIONS
Linux: Kernel 5.8.18_1
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
This is a regression since around 5.20.1.
Comment 1 David Edmundson 2023-09-06 10:38:51 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.