Mir

Merge lp://staging/~andreas-pokorny/mir/fix-1536279 into lp://staging/mir

Proposed by Andreas Pokorny
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 4121
Proposed branch: lp://staging/~andreas-pokorny/mir/fix-1536279
Merge into: lp://staging/mir
Prerequisite: lp://staging/~andreas-pokorny/mir/store-device-config
Diff against target: 716 lines (+254/-38)
15 files modified
src/client/buffer_vault.cpp (+1/-1)
src/client/connection_surface_map.cpp (+7/-0)
src/client/connection_surface_map.h (+2/-1)
src/client/default_connection_configuration.cpp (+2/-2)
src/client/input/input_devices.cpp (+39/-1)
src/client/mir_surface.cpp (+5/-0)
src/client/mir_surface.h (+1/-0)
src/client/rpc/mir_protobuf_rpc_channel.cpp (+1/-1)
src/include/client/mir/client/surface_map.h (+2/-1)
src/include/client/mir/input/input_devices.h (+3/-1)
tests/acceptance-tests/test_nested_input.cpp (+163/-17)
tests/include/mir/test/test_protobuf_client.h (+6/-1)
tests/mir_test_doubles/test_protobuf_client.cpp (+3/-2)
tests/unit-tests/client/test_protobuf_rpc_channel.cpp (+15/-8)
tests/unit-tests/frontend/stress_protobuf_communicator.cpp (+4/-2)
To merge this branch: bzr merge lp://staging/~andreas-pokorny/mir/fix-1536279
Reviewer Review Type Date Requested Status
Alan Griffiths Abstain
Cemil Azizoglu (community) Approve
Kevin DuBois (community) Approve
Mir CI Bot continuous-integration Approve
Andreas Pokorny (community) Abstain
Review via email: mp+319438@code.staging.launchpad.net

Commit message

Clear keystate and keymap on device removal (LP: #1536279)

  A client window may have a "default" keymap configured. So a keystate will be tracked for each keyboard device individually. Switching away from the vt of the mirserver will trigger a removal of all devices, switching back to the server will make those devices reappear.

 If the keystate is not cleared on removal any pressed key will be stuck during a vt switch.

Description of the change

This makes the keymapper in the client behave like the server on device removal.

The keystate gets cleared and when the device reappears and will be used again the default keymap will be used to create a clean keystate again.

Majority of the change is about constructing the test to have a mirserver with a nested server a focused window with a keymap configured followed by a vt switch and key presses..

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4080
https://mir-jenkins.ubuntu.com/job/mir-ci/3120/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4188/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4275
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4265
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4265
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4265
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4215/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4215
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4215/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4215
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4215/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4215
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4215/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4215
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4215/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4215/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3120/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4082
https://mir-jenkins.ubuntu.com/job/mir-ci/3167/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4249/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4336
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4326
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4326
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4326
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4276/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4276/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4276/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4276/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4276/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4276/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3167/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

^ the new test fails, the client does not receive the keymap in the time frame.

review: Needs Fixing
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

should be fine now..

review: Abstain
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4083
https://mir-jenkins.ubuntu.com/job/mir-ci/3173/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4258
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4345
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4335
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4335
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4335
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4285
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4285/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4285
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4285/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4285
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4285/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4285
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4285/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4285
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4285/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4285
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4285/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3173/rebuild

review: Approve (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

+ static void for_each_window(std::function<void(MirSurface &surf)> const& fun);

could we use ConnectionSurfaceMap here? (In the future, I think it would be good to remove the system of checking valid surfaces in favor of using the connection-saved map).

Alright by me otherwise.

review: Needs Information
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

> + static void for_each_window(std::function<void(MirSurface &surf)> const&
> fun);
>
> could we use ConnectionSurfaceMap here? (In the future, I think it would be
> good to remove the system of checking valid surfaces in favor of using the
> connection-saved map).

ok

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4085
https://mir-jenkins.ubuntu.com/job/mir-ci/3227/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4342
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4429
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4419
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4419
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4419
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4374
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4374/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4374
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4374/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4374
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4374/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4374
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4374/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4374
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4374/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4374
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4374/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3227/rebuild

review: Approve (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

thanks, lgtm

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

SurfaceTrackingShell looks familiar. Is the duplication useful or accidental?

review: Needs Information
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

LGTM

review: Approve
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

> SurfaceTrackingShell looks familiar. Is the duplication useful or accidental?

I am not sure it can be classified as accidental. And only useful until we discover a general problem...

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > SurfaceTrackingShell looks familiar. Is the duplication useful or
> accidental?
>
> I am not sure it can be classified as accidental. And only useful until we
> discover a general problem...

/shrug. But I will block a third copy.

review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches