Bug 426900 - [Wayland] Keyboard Layout applet doesn't follow actual layout switching
Summary: [Wayland] Keyboard Layout applet doesn't follow actual layout switching
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andrey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-23 12:10 UTC by Andrey
Modified: 2020-10-30 15:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
butirsky: Wayland+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey 2020-09-23 12:10:46 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

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.
Comment 1 Bug Janitor Service 2020-09-29 12:32:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/300
Comment 2 Bug Janitor Service 2020-09-29 12:37:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/303
Comment 3 David Edmundson 2020-10-02 15:33:56 UTC
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
Comment 4 Andrey 2020-10-02 18:45:38 UTC
Reopened since https://invent.kde.org/plasma/kwin/-/merge_requests/300 is not yet merged.
Comment 5 Andrey 2020-10-30 13:45:20 UTC
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
Comment 6 Andrey 2020-10-30 15:26:31 UTC
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