Bug 425590

Summary: no OSD indication when switching keyboard layout with Application Policy
Product: [Plasma] kwin Reporter: Andrey <butirsky>
Component: inputAssignee: Andrey <butirsky>
Status: RESOLVED FIXED    
Severity: normal CC: aspotashev, bugseforuns, katyaberezyaka, nate
Priority: NOR Flags: butirsky: Wayland+
Version: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
URL: https://invent.kde.org/plasma/kwin/-/merge_requests/210
See Also: https://bugs.kde.org/show_bug.cgi?id=425343
https://bugs.kde.org/show_bug.cgi?id=426120
https://bugs.kde.org/show_bug.cgi?id=426122
Latest Commit: Version Fixed In: 5.21
Bug Depends on:    
Bug Blocks: 418699    

Description Andrey 2020-08-20 12:54:19 UTC
SUMMARY
Happens in some cases as described below.

STEPS TO REPRODUCE
1. Set Application Policy for keyboard layout switching in Keyboard Settings. Make sure there are at least 2 layouts.
2. Switch layout in one app, not OSD notification pop up on the switching.
3. Focus another app.
4. Switch layout there (using hotkey or clicking Keyboard Layout applet in the systray).

OBSERVED RESULT
No OSD notification on the layout change.

EXPECTED RESULT
OSD should always popup on actual layout switching

SOFTWARE/OS VERSIONS
Operating System: Ubuntu 20.04
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Comment 1 Andrey 2020-08-20 13:12:35 UTC
Would be gratitude for the confirmation (hope the description is clear).
Comment 2 David Edmundson 2020-09-29 14:20:27 UTC
Git commit 769c8959d87792f85a7fb5f03106c720681aec4d by David Edmundson, on behalf of Andrey Butirsky.
Committed on 29/09/2020 at 14:20.
Pushed by davidedmundson into branch 'master'.

fix: no OSD indication when switching keyboard layout with Application Policy

When deciding do OSD or not, we need to consider not only last saved layout,
but last actual layout also, when comparing it to current one.

DIGEST:

M  +4    -1    keyboard_input.cpp
M  +18   -18   keyboard_layout.cpp
M  +1    -3    keyboard_layout.h

https://invent.kde.org/plasma/kwin/commit/769c8959d87792f85a7fb5f03106c720681aec4d