SUMMARY The applet only changes it's layout indication when it's clicked or on input event with the new layout (provoking OSD with the layout). But layout could also be changed due just switching between different windows/apps (when on App/Win layout Policy), or when it's loaded from previous session on start. In the latter case, the indication doesn't changes and therefor is wrong. STEPS TO REPRODUCE 1. Set Layout policy to Application (in keyboard settings) 2. Change layout for some app, note it from the applet in systray. 3. Switch active window to some other app. OBSERVED RESULT Layout indication doesn't change. EXPECTED RESULT The indication should follow currently active layout. Operating System: Ubuntu 20.04 KDE Plasma Version: 5.19.80 KDE Frameworks Version: 5.74.0 Qt Version: 5.14.2 ADDITIONAL INFORMATION It was fixed earlier for kwin's in-built C++ plasmoid in Bug 425343. Now we need the same for QML one, which is positioned as a replacement.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/300
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/303
Git commit 63e0ba2dfa334dfb46ad3071baa50af7b43ae042 by David Edmundson, on behalf of Andrey Butirsky. Committed on 02/10/2020 at 15:33. Pushed by davidedmundson into branch 'master'. fix: [2/2] Keyboard Layout applet doesn't follow actual layout switching DIGEST: M +14 -6 components/keyboardlayout/keyboardlayout.cpp M +1 -0 components/keyboardlayout/keyboardlayout.h https://invent.kde.org/plasma/plasma-workspace/commit/63e0ba2dfa334dfb46ad3071baa50af7b43ae042
Reopened since https://invent.kde.org/plasma/kwin/-/merge_requests/300 is not yet merged.
Git commit da346e1716a34054cb5620c03f16e45534d0988a by Andrey Butirsky. Committed on 30/10/2020 at 13:44. Pushed by butirsky into branch 'keyboard_layout_plasmoid'. fix: [1/2] Keyboard Layout applet doesn't follow actual layout switching We need to emit DBus signal on every layout change - explicit(keyboard shortcut, layout applet click) and implicit(focus window with different layout). Otherwise, external layout applet might not get updated. DIGEST: M +1 -0 keyboard_layout_switching.cpp https://invent.kde.org/plasma/kwin/commit/da346e1716a34054cb5620c03f16e45534d0988a
Git commit cfcf2baae789fe1665fabd8fa5701811b2f8668f by Andrey Butirsky. Committed on 30/10/2020 at 14:54. Pushed by butirsky into branch 'master'. fix: [1/2] Keyboard Layout applet doesn't follow actual layout switching We need to emit DBus signal on every layout change - explicit(keyboard shortcut, layout applet click) and implicit(focus window with different layout). Otherwise, external layout applet might not get updated. DIGEST: M +1 -0 keyboard_layout_switching.cpp https://invent.kde.org/plasma/kwin/commit/cfcf2baae789fe1665fabd8fa5701811b2f8668f