Bug 459538

Summary: Keyboard layout resets to English every time I switch virtual desktop using trackpad gesture in wayland
Product: [I don't know] kde Reporter: Alex <alexgintsis>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
URL: https://bugs.chromium.org/p/chromium/issues/detail?id=1338554
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alex 2022-09-22 16:35:32 UTC
SUMMARY

It happens only in wayland and when using Chromium based browsers. Keyboard layout resets to English every time I switch virtual desktop. (It doesn't happen in when typing in other apps like Dolphin) 
It doesn't occur when you use keyboard shortcuts to move to the next desktop , it only happens using the trackpad gesture

STEPS TO REPRODUCE
1. Login to wayland session
2. Set different language layouts per window
3. Open chrome and pick a different language layout 
4. Use the trackpad gesture to go to the next desktop and then get back to the previous one
5. Start typing in Chrome 

OBSERVED RESULT
The keyboard switches back to English although it shouldn't .
You have to lose focus of the chrome window and focus on it again . Then the keyboard switches back to the proper layout.

EXPECTED RESULT
Keyboard layout per window persist

SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-09-22 21:10:57 UTC
This is actually a bug in Chromium, believe it or not. Chromium hijacks the global shortcuts, with all sorts of creatively destructive consequences. See https://bugs.chromium.org/p/chromium/issues/detail?id=1338554.
Comment 2 Alex 2022-09-23 02:40:17 UTC
The thing is it's only happening when using the gesture not the global shortcut. Unfortunately it's very weird and very annoying. 
Thanks for answering