Bug 478113

Summary: Application Launcher/menu widget - wrong window focus after opening and closing the menu
Product: [Plasma] plasmashell Reporter: itouchdennis
Component: Application Launcher (Kickoff) widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: mikel5764, nate, noahadvs
Priority: NOR Keywords: qt6
Version First Reported In: 5.90.0   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description itouchdennis 2023-12-05 14:40:58 UTC
SUMMARY
Opening and closing the application menu (or application launcher) in the dock via meta key, will take all focus for the current window, even if the menu is closed, the focus seems still to be on the hidden menu, quick tile is not possible anymore for the currently open window using shortcuts, unless you clicked into the window via mouse to get the focus back. 


STEPS TO REPRODUCE
1.  Add a dock, add application launcher widget OR application menu widget to the dock
2. Setup quick tile shortcuts, e.g. meta + left for left quick tile, meta + above for fullscreen, and so on
3.  Open e.g. a browser (I used vivaldi)
4.  Press meta key to open the launcher
5. Press meta key again to close the launcher
6. try to quick tile the browser window via meta + left (nothing will happen unless you click into the window)

OBSERVED RESULT
Nothing happens unless you click again into the window

EXPECTED RESULT
Closing the menu will take back focus to the last application that have had the latest current focus, which will allow me to quick tile the window using quick tile shortcuts.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  EndeavourOS, KDE Plasma 6.0. Beta 1 
(available in About System)
KDE Plasma Version: KDE Plasma 6.0. Beta 1 
KDE Frameworks Version: 5.246.0  
Qt Version:  6.6.1


I am sure this will not only affect quick tile, probably also shortcuts that would work inner the application if the focus is set onclose the menu back to the latest application that have had the focus.
Comment 1 Nate Graham 2023-12-08 21:01:45 UTC
Are you using X11? This works as expected for me on today's git master with Wayland.
Comment 2 Nate Graham 2023-12-08 21:02:05 UTC
Ah of course, this is one of the things that was fixed a couple days ago.