STEPS TO REPRODUCE 1. use Wayland session 2. make sure 'When logging on: Restore last session' option is enabled in Desktop Session KCM 3. add two keyboard layouts in 'Layouts' tab of Keyboard KCM. I added these: first: English (US) second: Portuguese (Brazil) 4. select the second keyboard layout via Keyboard Layout applet in the system tray 5. logout 6. login to Wayland session (notice that the second keyboard layout selected in the step 4 is already active accordng to the Keyboard Layout applet in the system tray) 7. open Kate and type any word OBSERVED RESULT OSD of the keyboard layout unnecessarily appears when you type the word in Kate EXPECTED RESULT OSD should not appear SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.24.80 KDE Frameworks Version: 5.94.0 Qt Version: 5.15.3 Graphics Platform: Wayland
What is your Layout switching policy - is it Global or per App/Window? IIRC, the logic behind that behavior with App/Window policy is following: - on login, last used layout is restored, but for the window currently active only (which might be Desktop itself or so), as if you had changed it yourself - when you open a new app (Kate), it has internally saved "last used" layout initialized to a first layout which is US in your list - when the app got activated, the current layout is compared to a saved one for this app/window. If they differ, OSD happens which you got here The same logic will probably take place with App/Window policy even without logout/login. Can we perceive it as a feature as a logic behind is pretty solid? I'm afraid we would need hacks to suppress it.
My Layout switching policy is Global.
Ok. Then it's side-effect of the implementation. Do you think it can't be considered as a "feature", still?
I don't think unexpected and pointless behavior like this can be considered a feature.
There is still point - it reminds you the layout has changed implicitly
But the reminder is shown at an unexpected time. If we want to make this a feature, it should show the OSD at the moment of login, or the first time the user types something. If that's not possible, we should suppress the OSD in this case.
That suppression might be a hacky as we don't have an easy way to handle this situation, AFAIK. But yes I remember I faced something like this when I implemented all this stuff, so thank you for the catch anyway.
This only happens in the Wayland session. The X11 session doesn't do this.
(In reply to cantabile from comment #8) > This only happens in the Wayland session. The X11 session doesn't do this. Right, that OSD for X11 is not implemented for X11 at all AFAIK.
I do get the same OSD when I switch the layout with the keyboard shortcut in X11. It just doesn't appear when I go from Firefox (Romanian layout) to Konsole (US layout) and start typing, for example, even though the layout switches automatically. When I do the same thing in the Wayland session the OSD appears when I start typing.
*** Bug 476832 has been marked as a duplicate of this bug. ***
I've now noticed that sometimes the displayed OSD even manages to steal focus from the application. For example, when switching quickly with ALT+TAB from browser to editor with a different keyboard layout and starting typing right away, you may notice a few seconds later that the text cursor focus is not in the editor.
(In reply to cantabile from comment #10) > When I do the same thing in the Wayland session the > OSD appears when I start typing. What is your layout switching policy? The behavior you describe is specific to Wayland, at least for the App/Window switching policy (I'm not sure about Global one). If you don't like it, you can disable the OSD in Keyboard KCM. So I would say the bug is described confusingly. If it's problem with some corner case it should be clear from the heading. The OSD when you start typing in window with another layout is expected feature for Wayland.
(In reply to Andrey from comment #13) > The OSD when you start typing in window with another layout is expected > feature for Wayland. Would it make more sense to show the layout indicator right after switching windows, without waiting for the next keystroke? I can say for myself that I had to disable the indicator due to this bug. The indicator appearing on changing language felt like a nice confirmation; the indicator appearing on window switch would feel like a reminder too. The indicator appearing when I start typing felt different, more like an error of some kind, and kicked me out of the "composing text" context into the "reacting to events" one. Especially annoying when it did this every time when switching between text-operated windows with different layouts (think editor where I was writing text in English and a related chat I was having in a different language). If it happened on window switch it'd be perfectly okay for me as it'd overlap my context switch, but happening on the first keystroke it roughly doubled the context switch time for me and created an extra useless distraction. Trying to think about this some more I'd say that the problem is that for me it introduces a new and totally unneeded concept of "previous global layout". If I switch to a different window, then get slightly distracted and don't keep in mind that I came here from WINDOW, I don't remember what the keyboard layout was before switch, and have no way to guess whether the OSD will appear or not when I start typing. Especially given that the layout indicator (correctly) shows the new layout, not the old one. As yet another view on this problem, an indicator on the first keystroke is useless because it's too late. If I'm not looking at the screen I won't notice it at all. If I'm looking at the screen and the layout matches my intention it feels like an annoying "yeah, you're right" reminder. If I'm looking at the screen and the layout does not match my intention it comes at the same time I'd notice I'm typing wrong characters. In both latter cases it steals my personal attention focus without giving anything in return. Oh, and if I start with doing some interactive task like moving the cursor to the correct place it just breaks me out of the flow of this task. As a conclusion, I'd personally say that the minimal fix would be to show the indicator on window switch without delaying it to the first keystroke. I can also imagine some neat options that would be more invasive (like a language indicator for a window titlebar and making the notification into an animation of/around that indicator).
(In reply to Andrey from comment #13) > If you don't like it, you can disable the OSD in Keyboard KCM. Where exactly is that setting? Sorry, I can't find it (in Plasma 5).
(In reply to Silver Salonen from comment #15) > (In reply to Andrey from comment #13) > > If you don't like it, you can disable the OSD in Keyboard KCM. > > Where exactly is that setting? Sorry, I can't find it (in Plasma 5). For me there's a checkbox "OSD on layout change" in Settings - Keyboard - Layouts tab, in the "Shortcuts for switching layouts" group.
(In reply to Denis Lisov from comment #16) > (In reply to Silver Salonen from comment #15) > > (In reply to Andrey from comment #13) > > > If you don't like it, you can disable the OSD in Keyboard KCM. > > > > Where exactly is that setting? Sorry, I can't find it (in Plasma 5). > > For me there's a checkbox "OSD on layout change" in Settings - Keyboard - > Layouts tab, in the "Shortcuts for switching layouts" group. For me there's not. Are you on Plasma 6 perhaps?
(In reply to Denis Lisov from comment #14) > (In reply to Andrey from comment #13) > > The OSD when you start typing in window with another layout is expected > > feature for Wayland. > > Would it make more sense to show the layout indicator right after switching > windows, without waiting for the next keystroke? That would unnecessary show OSD if you switch windows without typing. Anyway, the feature implementation details should go to another report, thanks.
(In reply to Andrey from comment #18) > (In reply to Denis Lisov from comment #14) > > (In reply to Andrey from comment #13) > > > The OSD when you start typing in window with another layout is expected > > > feature for Wayland. > > > > Would it make more sense to show the layout indicator right after switching > > windows, without waiting for the next keystroke? > That would unnecessary show OSD if you switch windows without typing. > Anyway, the feature implementation details should go to another report, > thanks. I actually just recently noticed this happening in Plasma 5 with X11 on Ubuntu, so this seems to be implemented already. Or is it only with X11 and not with Wayland?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!
This bug persists. Operating System: KDE neon Unstable Edition KDE Plasma Version: 6.0.80 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Graphics Platform: Wayland
(In reply to Andrey from comment #13) > The OSD when you start typing in window with another layout is expected > feature for Wayland. If we want it to be actionable, let's please create another report, thanks.