Bug 425343

Summary: [Wayland] Keyboard Layout applet doesn't follow actual layout switching
Product: [Plasma] kwin Reporter: Andrey <butirsky>
Component: inputAssignee: Andrey <butirsky>
Status: RESOLVED FIXED    
Severity: normal CC: aspotashev, bugseforuns, katyaberezyaka
Priority: NOR Flags: butirsky: Wayland+
Version: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=412101
https://bugs.kde.org/show_bug.cgi?id=418699
https://bugs.kde.org/show_bug.cgi?id=425590
https://bugs.kde.org/show_bug.cgi?id=390079
https://bugs.kde.org/show_bug.cgi?id=426900
Latest Commit: Version Fixed In:

Description Andrey 2020-08-14 12:38:56 UTC
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
Comment 1 Bug Janitor Service 2020-08-20 12:09:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/203
Comment 2 Vlad Zahorodnii 2020-08-20 16:09:48 UTC
Git commit cba895e7239e5919aa15adfb4e71ad72fb6c0806 by Vlad Zahorodnii, on behalf of Andrey Butirsky.
Committed on 20/08/2020 at 16:09.
Pushed by vladz into branch 'master'.

fix: keyboard layout applet doesn't show actual layout

M  +1    -1    keyboard_layout.h
M  +5    -1    keyboard_layout_switching.cpp

https://invent.kde.org/plasma/kwin/commit/cba895e7239e5919aa15adfb4e71ad72fb6c0806
Comment 3 Patrick Silva 2020-08-21 12:25:01 UTC
I can confirm that this bug is fixed on neon unstable. :)
Comment 4 Andrey 2020-08-21 12:27:35 UTC
Very nice! Another batch of fixes pending. Stay watching ;)