Bug 484913

Summary: Switching keyboards when having keyboard system tray icon causes input to lose focus.
Product: [Plasma] plasmashell Reporter: Ólafur P <olafur.palsson2>
Component: Keyboard Layout widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: butirsky
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ólafur P 2024-04-02 09:53:11 UTC
SUMMARY
When typing in an input and then pressing the shortcut to switch keyboard language, the window will lose focus.

STEPS TO REPRODUCE
1. Setup two keyboard layout with a shortcut to switch between layout
2. Add Keyboard layout system tray item 
3. Start typing in an input
4. Press the shortcut to switch between layout 
or 
4. Click on the keyboard component to switch layouts.

OBSERVED RESULT
The window and input will lose focus, and you have to click it again to resume typing

EXPECTED RESULT
The window and input stays focused, and you can keep typing with the new keyboard layout

ADDITIONAL INFORMATION

Removing "Keyboard layout applet and System Tray item" from the System Tray stops the bug from occurring.
Having the Component on the desktop also doesn't cause the bug.

In the buggy state...
Pressing ESC restores focus to the window.
Pressing Enter or Space opens Application Launcher (Start menu).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.7.9-arch1-1
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

and

Linux/KDE Plasma: KDE Neon 6.0
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Comment 1 Ólafur P 2024-04-08 12:30:41 UTC
After recent update the bug is gone.