Merge lp:~lukas-kde/unity8/defaultKeymap into lp:unity8

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Gerry Boland
Approved revision: 2622
Merged at revision: 2771
Proposed branch: lp:~lukas-kde/unity8/defaultKeymap
Merge into: lp:unity8
Diff against target: 121 lines (+34/-9)
5 files modified
CMakeLists.txt (+1/-1)
debian/control (+1/-1)
qml/Components/KeymapSwitcher.qml (+15/-7)
tests/mocks/Unity/Application/MirMock.cpp (+13/-0)
tests/mocks/Unity/Application/MirMock.h (+4/-0)
To merge this branch: bzr merge lp:~lukas-kde/unity8/defaultKeymap
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Gerry Boland (community) Approve
Review via email: mp+306761@code.launchpad.net

Commit message

Fix keymap not being applied on the shell itself

Description of the change

Prereq-archive: ppa:ci-train-ppa-service/2272

Bind the keymap to the global device keymap which is then applied to Mir's device config. Need to keep the old surface binding in place as well due to xmir/libertine apps.

 * Are there any related MPs required for this MP to build/function as expected? Please list.

Yes, https://code.launchpad.net/~lukas-kde/qtmir/defaultKeymap/+merge/306519

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

 * If you changed the UI, has there been a design review?

N/A

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Why the commented out bit?

review: Needs Information
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

This is WIP, need to test it out together with the Mir fix (currently in https://bileto.ubuntu.com/#/ticket/2003) if it doesn't clash with our surface-based approach.

I'd appreciate if someone could look at https://code.launchpad.net/~lukas-kde/qtmir/defaultKeymap/+merge/306519 first :)

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Works well, and code is reasonable

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2622
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2908/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/3793/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3821
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3664
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3664/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3664
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3664/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3664
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3664/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3664/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3664
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3664/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3664/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2908/rebuild

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

FAILED: Continuous integration, rev:2622
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2930/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3825
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2219
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2219
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3853
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3696
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3696/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3696
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3696/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3696
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3696/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3696
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3696/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3696
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3696/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3696
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3696/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2930/rebuild

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

FAILED: Continuous integration, rev:2622
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2977/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2977/rebuild

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

PASSED: Continuous integration, rev:2622
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2976/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3877
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2267
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2267
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3905
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3750
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3750/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3750
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3750/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3750
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3750/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3750
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3750/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3750
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3750/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3750
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3750/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2976/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-12-12 16:45:09 +0000
+++ CMakeLists.txt 2017-01-02 11:20:59 +0000
@@ -70,7 +70,7 @@
70find_package(Qt5Concurrent 5.4 REQUIRED)70find_package(Qt5Concurrent 5.4 REQUIRED)
71find_package(Qt5Sql 5.4 REQUIRED)71find_package(Qt5Sql 5.4 REQUIRED)
7272
73pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=23)73pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=25)
74pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)74pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
75pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)75pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
76pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)76pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
7777
=== modified file 'debian/control'
--- debian/control 2016-12-12 16:45:09 +0000
+++ debian/control 2017-01-02 11:20:59 +0000
@@ -38,7 +38,7 @@
38 libubuntugestures5-private-dev (>= 1.3.2030),38 libubuntugestures5-private-dev (>= 1.3.2030),
39 libudev-dev,39 libudev-dev,
40 libudm-common-dev,40 libudm-common-dev,
41 libunity-api-dev (>= 8.0),41 libunity-api-dev (>= 8.1),
42 libusermetricsoutput1-dev,42 libusermetricsoutput1-dev,
43# Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop43# Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
44 libx11-dev[!arm64 !armhf],44 libx11-dev[!arm64 !armhf],
4545
=== modified file 'qml/Components/KeymapSwitcher.qml'
--- qml/Components/KeymapSwitcher.qml 2016-11-30 19:24:02 +0000
+++ qml/Components/KeymapSwitcher.qml 2017-01-02 11:20:59 +0000
@@ -51,6 +51,9 @@
51 nextIndex = currentKeymapIndex + 1;51 nextIndex = currentKeymapIndex + 1;
52 }52 }
53 currentKeymapIndex = nextIndex;53 currentKeymapIndex = nextIndex;
54 if (actionGroup.currentAction.valid) {
55 actionGroup.currentAction.updateState(currentKeymapIndex);
56 }
54 }57 }
5558
56 function previousKeymap() {59 function previousKeymap() {
@@ -60,30 +63,35 @@
60 prevIndex = currentKeymapIndex - 1;63 prevIndex = currentKeymapIndex - 1;
61 }64 }
62 currentKeymapIndex = prevIndex;65 currentKeymapIndex = prevIndex;
66 if (actionGroup.currentAction.valid) {
67 actionGroup.currentAction.updateState(currentKeymapIndex);
68 }
63 }69 }
6470
65 property Binding surfaceKeymapBinding: Binding {71 property Binding surfaceKeymapBinding: Binding { // NB: needed mainly for xmir & libertine apps
66 target: root.focusedSurface72 target: root.focusedSurface
67 property: "keymap"73 property: "keymap"
68 value: root.currentKeymap74 value: root.currentKeymap
69 }75 }
7076
77 property Binding unityKeymapBinding: Binding {
78 target: Mir
79 property: "currentKeymap"
80 value: root.currentKeymap
81 }
82
71 // indicator83 // indicator
72 property QDBusActionGroup actionGroup: QDBusActionGroup {84 property QDBusActionGroup actionGroup: QDBusActionGroup {
73 busType: DBus.SessionBus85 busType: DBus.SessionBus
74 busName: "com.canonical.indicator.keyboard"86 busName: "com.canonical.indicator.keyboard"
75 objectPath: "/com/canonical/indicator/keyboard"87 objectPath: "/com/canonical/indicator/keyboard"
7688
77 property variant currentAction: action("current")89 property variant currentAction: action("current") // the one that's checked by the indicator
78 property variant activeAction: action("active")90 property variant activeAction: action("active") // the one that we clicked
7991
80 Component.onCompleted: actionGroup.start();92 Component.onCompleted: actionGroup.start();
81 }93 }
8294
83 onCurrentKeymapIndexChanged: {
84 actionGroup.currentAction.updateState(currentKeymapIndex);
85 }
86
87 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -195 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1
8896
89 onActiveActionStateChanged: {97 onActiveActionStateChanged: {
9098
=== modified file 'tests/mocks/Unity/Application/MirMock.cpp'
--- tests/mocks/Unity/Application/MirMock.cpp 2016-10-20 14:37:34 +0000
+++ tests/mocks/Unity/Application/MirMock.cpp 2017-01-02 11:20:59 +0000
@@ -47,3 +47,16 @@
47{47{
48 return m_cursorName;48 return m_cursorName;
49}49}
50
51QString MirMock::currentKeymap() const
52{
53 return m_keymap;
54}
55
56void MirMock::setCurrentKeymap(const QString &keymap)
57{
58 if (keymap != m_keymap) {
59 m_keymap = keymap;
60 Q_EMIT currentKeymapChanged(m_keymap);
61 }
62}
5063
=== modified file 'tests/mocks/Unity/Application/MirMock.h'
--- tests/mocks/Unity/Application/MirMock.h 2016-10-20 14:37:34 +0000
+++ tests/mocks/Unity/Application/MirMock.h 2017-01-02 11:20:59 +0000
@@ -31,9 +31,13 @@
31 void setCursorName(const QString &cursorName) override;31 void setCursorName(const QString &cursorName) override;
32 QString cursorName() const override;32 QString cursorName() const override;
3333
34 QString currentKeymap() const override;
35 void setCurrentKeymap(const QString &keymap) override;
36
34private:37private:
35 static MirMock *the_mir;38 static MirMock *the_mir;
36 QString m_cursorName;39 QString m_cursorName;
40 QString m_keymap;
37};41};
3842
39#endif43#endif

Subscribers

People subscribed via source and target branches