Mir

Merge lp:~andreas-pokorny/mir/fix-1675357 into lp:mir

Proposed by Andreas Pokorny
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 4116
Merged at revision: 4117
Proposed branch: lp:~andreas-pokorny/mir/fix-1675357
Merge into: lp:mir
Diff against target: 25 lines (+6/-2)
1 file modified
src/server/input/default_configuration.cpp (+6/-2)
To merge this branch: bzr merge lp:~andreas-pokorny/mir/fix-1675357
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve
Kevin DuBois (community) Approve
Review via email: mp+320971@code.launchpad.net

Commit message

Fix infinite sending of repeat keys after devices disappear in nested servers (LP: #1675357)

Description of the change

The repeat key dispatcher that listens for key presses and releases and tracks whether devices disappear. But because of the asymmetry in the initialization of the key repeat dispatcher unity8 had a key repeat dispatcher in place that never received the device removal calls.

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

PASSED: Continuous integration, rev:4115
https://mir-jenkins.ubuntu.com/job/mir-ci/3245/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4368
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4455
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4445
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4445
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4445
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4400
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4400/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/4400
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4400/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4400
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4400/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/4400
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4400/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/4400
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4400/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/4400
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4400/artifact/output/*zip*/output.zip

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

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

alright, part of the code that's hard to test, so might be better to at least note the bug around the area of the fix

review: Approve
lp:~andreas-pokorny/mir/fix-1675357 updated
4116. By Andreas Pokorny

hint towards lp ticket

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

PASSED: Continuous integration, rev:4116
https://mir-jenkins.ubuntu.com/job/mir-ci/3246/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4370
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4457
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4447
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4447
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4447
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4402
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4402/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/4402
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4402/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4402
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4402/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/4402
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4402/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/4402
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4402/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/4402
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4402/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/input/default_configuration.cpp'
2--- src/server/input/default_configuration.cpp 2017-03-14 16:17:51 +0000
3+++ src/server/input/default_configuration.cpp 2017-03-24 19:38:19 +0000
4@@ -150,7 +150,9 @@
5 std::chrono::milliseconds const key_repeat_delay{50};
6
7 auto const options = the_options();
8- auto enable_repeat = options->get<bool>(options::enable_key_repeat_opt);
9+ // lp:1675357: Disable generation of key repeat events on nested servers
10+ auto enable_repeat = options->get<bool>(options::enable_key_repeat_opt) &&
11+ !options->is_set(options::host_socket_opt);
12
13 return std::make_shared<mi::KeyRepeatDispatcher>(
14 the_event_filter_chain_dispatcher(), the_main_loop(), the_cookie_authority(),
15@@ -323,7 +325,9 @@
16 the_key_mapper(),
17 the_server_status_listener());
18
19- if (key_repeater && !the_options()->is_set(options::host_socket_opt))
20+ // lp:1675357: KeyRepeatDispatcher must be informed about removed input devices, otherwise
21+ // pressed keys get repeated indefinitely
22+ if (key_repeater)
23 key_repeater->set_input_device_hub(hub);
24 return hub;
25 });

Subscribers

People subscribed via source and target branches