Merge lp://staging/~andreas-pokorny/mir/fix-1588237 into lp://staging/mir
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andreas Pokorny | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 4016 | ||||
Proposed branch: | lp://staging/~andreas-pokorny/mir/fix-1588237 | ||||
Merge into: | lp://staging/mir | ||||
Prerequisite: | lp://staging/~andreas-pokorny/mir/send-input-device-state-event | ||||
Diff against target: |
498 lines (+269/-14) 7 files modified
src/client/input/android/android_input_receiver.cpp (+22/-6) src/client/input/xkb_mapper.cpp (+59/-4) src/include/common/mir/input/key_mapper.h (+1/-0) src/include/common/mir/input/xkb_mapper.h (+7/-0) src/server/input/seat_input_device_tracker.cpp (+39/-2) tests/acceptance-tests/test_client_input.cpp (+140/-2) tests/include/mir/test/doubles/mock_key_mapper.h (+1/-0) |
||||
To merge this branch: | bzr merge lp://staging/~andreas-pokorny/mir/fix-1588237 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandros Frantzis (community) | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Review via email: mp+299353@code.staging.launchpad.net |
Commit message
Fix behavior of numlock and related modifier keys (LP: #1588237)
Corrects the tracking of modifiers that can be toggled. The input device state event now transfers the state of the toggled modifiers via double entries in the scan code array. Finally this change adds some missing wiring to forward the input device state event to the client side XkbMapper.
Description of the change
Three small changes that add all missing pieces to fix client side key mapping.
First of all the modifier tracking for toggling modifiers had to be fixed. Then those modifiers need special treatment to transfer them from the server to the upcoming focused client. The client needs that status to feed that back into xkb. This is done via scan codes - with that we also handle the case that the client keymap configuration remapped that toggling modifier.
When and where is that relevant?
If we do all scan code to key mapping in the server this change is not really necessary. The server keeps the key state separate from the currently focused window. So the modifier state stays correct when input focus is switched between surfaces. Because of Xmir/X11 we still have to support client side key mapping. So clients have to be informed about modifier state beyond the list of depressed keys.
Note on testing:
In mir/miral the default is to do server side key mapping only.
But his can be easily changed:
Add
xkb_mapper-
to the constructor of android_
Launch "gedit -s" twice, and change num lock or caps lock in one gedit then type in the other.
FAILED: Continuous integration, rev:3534 /mir-jenkins. ubuntu. com/job/ mir-ci/ 1236/ /mir-jenkins. ubuntu. com/job/ build-mir/ 1438/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/1490 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1481 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 1481 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= vivid+overlay/ 1452 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= vivid+overlay/ 1452/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 1452/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 1452 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 1452/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 1452 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 1452/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 1452/console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 1236/rebuild
https:/