https://bugs.kde.org/show_bug.cgi?id=377155

Martin Gräßlin <mgraess...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://commits.kde.org/kwi
                   |                            |n/a039c2760f6458059dfc91b03
                   |                            |5a5e03022a31d12

--- Comment #14 from Martin Gräßlin <mgraess...@kde.org> ---
Git commit a039c2760f6458059dfc91b035a5e03022a31d12 by Martin Gräßlin.
Committed on 24/04/2017 at 19:00.
Pushed by graesslin into branch 'master'.

Handle modifier updates in the same sequence as Wayland does

Summary:
Consider the case that capslock gets pressed and released.
In the case of Weston we have a sequence of:
 1. Key press event
 2. Modifier changed event
 3. Key release event
 4. Modifier changed event

KWin however used to send the events in the following sequence:
 1. Modifier changed event (on key press)
 2. Key press event
 3. Modifier changed event (on key release)
 4. Key release event

It looks like Xwayland is not able to properly process the sequence
sent by KWin. And in fact KWin's sequence is wrong as it sends a state
which does not match. We report that the caps lock is pressed in the
modifiers prior to the application getting informed about the key press
of caps lock.

This change aligns KWin's implementation to the behavior of Weston. The
main difference is that when modifiers change Xkb internally caches the
serialized modifier states. And KeyboardInputRedirection just forwards
the modifiers to KWayland::Server::SeatInterface once the processing has
finished. SeatInterface ignores the forwarding if no states changes, so
it is fine to do it that way.

Test Plan:
Not yet tested with an affected Xwayland as I only have 1.18 and the
problem started with 1.19. But verified the sequence of events with
WAYLAND_DEBUG
and caps lock stil working in QtWayland clients and Xwayland 1.18

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

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

M  +2    -0    keyboard_input.cpp
M  +21   -9    xkb.cpp
M  +11   -0    xkb.h

https://commits.kde.org/kwin/a039c2760f6458059dfc91b035a5e03022a31d12

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to