Bug 441239

Summary: Keyboard layout applet in systemtray can't be switched to spare layout
Product: [Plasma] plasmashell Reporter: Najjar <abderrahman.najjar>
Component: Keyboard LayoutAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: 0976589260dima, butirsky, kolya, materka, nate, semen.vozhov
Priority: NOR Keywords: regression
Version: 5.22.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
URL: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/513
See Also: https://bugs.kde.org/show_bug.cgi?id=438460
Latest Commit: Version Fixed In: 5.23
Sentry Crash Report:
Attachments: Keyboard applet settings
Keyboard applet
Keyboard layout settings

Description Najjar 2021-08-20 13:46:52 UTC
Created attachment 140874 [details]
Keyboard applet settings

SUMMARY
When setting a spare keyboard layout in Keyboard settings (to avoid cycling through infrequently used layouts when using the keyboard shortcut), clicking and selecting the desired language layout (any layout on the menu) it doesn't happen. It happened somewhere a few upgrades back (I can't tell when, I haven't tried switching to a spare layout in some time). The keyboard shortcut cycles through all layouts normally if "spare layouts" is unchecked.

STEPS TO REPRODUCE
1. Previously set spare layout in applet settings
2. Try switching to spare (or any other) layout by clicking on the applet and selecting the language
3. Nothing happens


OBSERVED RESULT
No keyboard layout switch

EXPECTED RESULT
Language layout should be switched

SOFTWARE/OS VERSIONS
Linux: 5.13.12-arch1-1 amd64
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Najjar 2021-08-20 13:47:35 UTC
Created attachment 140875 [details]
Keyboard applet
Comment 2 Najjar 2021-08-20 13:47:55 UTC
Created attachment 140876 [details]
Keyboard layout settings
Comment 3 Andrey 2021-08-20 15:07:55 UTC
Thanks for reporting, this is a known problem not actually related with spare layouts.
We introduced regression with this workaround MR:
https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/513
After that, the keyboard layout applet's context menu doesn't reacts on items clicks any more.

Unfortunately, it's not known yet how to solve this, as reverting the workaround is not an option probably.
Comment 4 Andrey 2021-09-07 16:07:42 UTC
*** Bug 442123 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2021-09-21 16:13:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/568
Comment 6 Andrey 2021-09-28 13:45:29 UTC
Git commit e41bb3111141814f84e9183625f837a5b255cd47 by Andrey Butirsky.
Committed on 28/09/2021 at 13:45.
Pushed by butirsky into branch 'master'.

[keyboardlayout applet] fix non-working context menu

After refactoring, keyboardLayout plugin is not accessible any more from
root Item object, so we pass the needed info from Action via signal.

M  +12   -3    applets/keyboardlayout/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/e41bb3111141814f84e9183625f837a5b255cd47
Comment 7 Andrey 2021-09-28 13:52:49 UTC
Git commit 956315c2dd4f1ba5f6dbaf3e74b743f33b21be10 by Andrey Butirsky.
Committed on 28/09/2021 at 13:52.
Pushed by butirsky into branch 'Plasma/5.23'.

[keyboardlayout applet] fix non-working context menu

After refactoring, keyboardLayout plugin is not accessible any more from
root Item object, so we pass the needed info from Action via signal.


(cherry picked from commit e41bb3111141814f84e9183625f837a5b255cd47)

M  +12   -3    applets/keyboardlayout/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/956315c2dd4f1ba5f6dbaf3e74b743f33b21be10
Comment 8 Nate Graham 2021-10-05 03:45:44 UTC
*** Bug 443227 has been marked as a duplicate of this bug. ***