Bug 499140

Summary: Closing Kickoff/launcher menu doesn't return focus correctly on multi-screen setup
Product: [Plasma] kwin Reporter: Anton <antkaid+bugskde>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate, niccolo.venerandi, xaver.hugl
Priority: NOR Keywords: multiscreen
Version First Reported In: 6.2.4   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Anton 2025-01-25 18:42:45 UTC
SUMMARY
On a multi-display config, closing the main KDE menu with Super or Esc does not return focus to the last focused window if that window is on the secondary display. If it's on the primary display (where the main panel is), focus is returned correctly.

STEPS TO REPRODUCE
Can be reproduced with e.g. 2 terminal windows.
1. Position window A on the secondary and window B on the primary display.
2. Verify focus in window A by typing something in it.
3. Press Super key twice or Super plus Esc, resulting in the main menu opening and immediately closing.

OBSERVED RESULT
The focus returns to window B, not A.

EXPECTED RESULT
The focus should return to window A.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian testing (12, trixie)
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
The real-life use case leading to this discovery: having the panel auto-hiding on the main display, working at the secondary display, then checking something on the panel (weather/clock/etc.) with a quick Super-Super double-press, and getting a completely different window taking input from that moment on. The bug reproduces on an always-visible panel, too.
Comment 1 Nate Graham 2025-05-14 20:07:17 UTC
I can reproduce this issue. Focus moves over to the last-focused window *on the screen where Kickoff opened and closed*, not the last-focused window on any screen.

I *think* this is a KWin issue; moving there.