Merge lp://staging/~andreas-pokorny/mir/wait-for-input-config-before-emitting-input-state into lp://staging/mir
Status: | Merged |
---|---|
Merged at revision: | 4112 |
Proposed branch: | lp://staging/~andreas-pokorny/mir/wait-for-input-config-before-emitting-input-state |
Merge into: | lp://staging/mir |
Diff against target: |
118 lines (+43/-29) 2 files modified
src/server/graphics/nested/input_platform.cpp (+41/-29) src/server/graphics/nested/input_platform.h (+2/-0) |
To merge this branch: | bzr merge lp://staging/~andreas-pokorny/mir/wait-for-input-config-before-emitting-input-state |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandros Frantzis (community) | Needs Information | ||
Mir CI Bot | continuous-integration | Approve | |
Review via email: mp+319328@code.staging.launchpad.net |
Commit message
Wait for the arrival of the input config message before attempting to propagate input device state events
The former informs the nested server about the available devices, the latter is supposed to synchronize the host server input state with the focused client (here the nested server).
When launching the nested server there is a potential race between the initial input device state event and the input config. This problem is most visible when vt switching. Since the per-surface input fds have been removed, and all events are sent to the connection this race is harder to notice. Still the two messages may be sent by different threads in the server. This should be the last cause for the two prominent CI failures mentioned.
Description of the change
This race was found while working on the issue with stuck alt keys.
There are two messages involved. One indicates which input devices are available in the system. The one is treated as an Event the InputDeviceStat
In the past a reordering of that was easy to trigger because it involved separate fds, now it requires a specific scheduling on the server, which happens frequently when trying to simulate pause/resume behavior.
Maybe the attached bugs have already been fixed or are just more rare due to other changes:
* removal of the per-surface fds
* updated surface input dispatcher logic in mir::input:
Nonetheless the change here is related to the two linked problems.
PASSED: Continuous integration, rev:4069 /mir-jenkins. ubuntu. com/job/ mir-ci/ 3114/ /mir-jenkins. ubuntu. com/job/ build-mir/ 4177 /mir-jenkins. ubuntu. com/job/ build-0- fetch/4264 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 4254 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 4254 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/4254 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/4204 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/4204/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4204 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4204/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/4204 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/4204/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 4204 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 4204/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 4204 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 4204/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4204 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4204/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 3114/rebuild
https:/