Lock screen uses last active window's language instead of default keyboard language
Quite old and annoying bug: https://bugs.launchpad.net/unity/+bug/1286910
Original description is:
Lock screen (gnome-screensaver) uses last active window's language (keyboard layout) instead of default keyboard language.
Steps to reproduce this bug:
1. In the system Text Entry settings:
1a. add two or more languages to the input sources list, e.g. English (as first and default) and Russian (as second);
1b. Set hotkeys to switch sources (e.g. Ctrl+Shift or CapsLock).
1c. Select "Allow different sources for each window" radio button.
1d. Select "New windows use the default source" radio button.
2. Run any application (e.g. gedit) and switch keyboard to second input language (Russian).
3. Lock the screen (Ctrl+Alt+L) or just wait idle time.
4. See what language set by default for password input in the lock screen.
Expected: lock screen uses first input language (English) by default.
What happened instead: lock screen uses last active window's language (Russian).
I have Debian 9.7 with GNOME and see the same issue. Believe it's related to gdm or so called "gnome screensaver" (whatever that means).
Could please someone help to finally resolve this bug?