Bug 367637 - KWin triggers OSD for the keyboard layout change even if there are no changes
Summary: KWin triggers OSD for the keyboard layout change even if there are no changes
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D2521
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-21 11:45 UTC by Ivan Čukić
Modified: 2016-08-22 09:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Čukić 2016-08-21 11:45:49 UTC
I have set the keyboard layout changing to (left) Alt+Space.
(have had it for quite some time now and only recently got this issue - maybe because OSD didn't show up for layout changing before)

Now, every time that I press the space key (without modifiers, with ctrl, with anything) I get the OSD stating my keyboard layout has been changed.

The interesting thing is that the OSD actually cycles through all the layouts, even if the layout is never changed.

When I do press Alt+Space, the layout changes as it should, and the OSD pops up telling me I changed to a wrong one because it thinks the ordinary 'space' presses changed the layout before.

The icon notifier in the system tray works without issues - it always correctly shows the current layout.

The place where the OSD is triggered is Xkb::updateModifiers (tested with bustle).

Reproducible: Always
Comment 1 Martin Flöser 2016-08-21 14:45:52 UTC
Is that on Wayland or X11?
Comment 2 Ivan Čukić 2016-08-21 15:35:26 UTC
X11
Comment 3 Martin Flöser 2016-08-21 16:15:40 UTC
Please try: https://phabricator.kde.org/D2521
Comment 4 Ivan Čukić 2016-08-21 16:49:59 UTC
With that patch I don't get the OSD at all.

Though I guess the issue of not showing OSD is not a part of this one, so we can say D2521 fixes this one :)
Comment 5 Martin Flöser 2016-08-21 18:04:33 UTC
> Though I guess the issue of not showing OSD

I think that's due to changing the layout through the combination. If you would change through the kglobalaccel shortcut (ctrl+alt+k) or through the sni I guess you would also get the OSD. IIRC the kded module is not able to detect layout changes through the shortcuts configured in the layout. On Wayland though that works.
Comment 6 Ivan Čukić 2016-08-21 18:18:09 UTC
Yes, C+A+K does show the OSD.
Comment 7 Martin Flöser 2016-08-22 09:37:15 UTC
Git commit 7d7bbcc56aa201964c63391a3686fb7efad36dfa by Martin Gräßlin.
Committed on 21/08/2016 at 16:15.
Pushed by graesslin into branch 'master'.

Only trigger keyboard layout OSD if KWin manages input

Summary:
On platforms where KWin does not manage input, that is does not
use libinput, KWin gets the keyboard layout from another place, e.g.
the X server. In that case KWin should of course not trigger the
layout changed OSD if KWin thinks (for whatever reason) that the
layout changed.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2521

M  +10   -7    keyboard_input.cpp

http://commits.kde.org/kwin/7d7bbcc56aa201964c63391a3686fb7efad36dfa