Merge lp:~mzanetti/unity8/disable-spread-while-locked into lp:unity8
- disable-spread-while-locked
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Lukáš Tinkl | ||||
Approved revision: | 2701 | ||||
Merged at revision: | 2715 | ||||
Proposed branch: | lp:~mzanetti/unity8/disable-spread-while-locked | ||||
Merge into: | lp:unity8 | ||||
Prerequisite: | lp:~bhdouglass/unity8/disable-indicator-menu | ||||
Diff against target: |
110 lines (+54/-4) 3 files modified
qml/Shell.qml (+0/-2) qml/Stage/Stage.qml (+8/-2) tests/qmltests/tst_Shell.qml (+46/-0) |
||||
To merge this branch: | bzr merge lp:~mzanetti/unity8/disable-spread-while-locked | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Approve | |
Lukáš Tinkl (community) | Approve | ||
Review via email: mp+311515@code.launchpad.net |
This proposal supersedes a proposal from 2016-11-14.
Commit message
disable spread interaction while locked
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
no
* 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?
no
* If you changed the UI, has there been a design review?
no
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2698
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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2699
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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2701. By Michael Zanetti
-
fix bad merge
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2700
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: 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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2700
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2701
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: 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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2701
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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'qml/Shell.qml' |
2 | --- qml/Shell.qml 2016-11-22 17:01:17 +0000 |
3 | +++ qml/Shell.qml 2016-11-22 17:01:17 +0000 |
4 | @@ -311,8 +311,6 @@ |
5 | keepDashRunning: launcher.shown || launcher.dashSwipe |
6 | altTabPressed: physicalKeysMapper.altTabPressed |
7 | oskEnabled: shell.oskEnabled |
8 | - |
9 | - // TODO: This is not implemented yet in the new stage... |
10 | spreadEnabled: tutorial.spreadEnabled && (!greeter || (!greeter.hasLockedApp && !greeter.shown)) |
11 | } |
12 | } |
13 | |
14 | === modified file 'qml/Stage/Stage.qml' |
15 | --- qml/Stage/Stage.qml 2016-11-12 16:05:40 +0000 |
16 | +++ qml/Stage/Stage.qml 2016-11-22 17:01:17 +0000 |
17 | @@ -92,7 +92,9 @@ |
18 | |
19 | onAltTabPressedChanged: { |
20 | if (altTabPressed) { |
21 | - altTabDelayTimer.start(); |
22 | + if (root.spreadEnabled) { |
23 | + altTabDelayTimer.start(); |
24 | + } |
25 | } else { |
26 | // Alt Tab has been released, did we already go to spread? |
27 | if (priv.goneToSpread) { |
28 | @@ -127,7 +129,9 @@ |
29 | function updateFocusedAppOrientation() { /* TODO */ } |
30 | function updateFocusedAppOrientationAnimated() { /* TODO */} |
31 | function pushRightEdge(amount) { |
32 | - edgeBarrier.push(amount); |
33 | + if (root.spreadEnabled) { |
34 | + edgeBarrier.push(amount); |
35 | + } |
36 | } |
37 | |
38 | function closeSpread() { |
39 | @@ -168,6 +172,7 @@ |
40 | GlobalShortcut { |
41 | id: showSpreadShortcut |
42 | shortcut: Qt.MetaModifier|Qt.Key_W |
43 | + active: root.spreadEnabled |
44 | onTriggered: priv.goneToSpread = true |
45 | } |
46 | |
47 | @@ -1788,6 +1793,7 @@ |
48 | direction: Direction.Leftwards |
49 | anchors { top: parent.top; right: parent.right; bottom: parent.bottom } |
50 | width: root.dragAreaWidth |
51 | + enabled: root.spreadEnabled |
52 | |
53 | property var gesturePoints: [] |
54 | property bool cancelled: false |
55 | |
56 | === modified file 'tests/qmltests/tst_Shell.qml' |
57 | --- tests/qmltests/tst_Shell.qml 2016-11-22 17:01:17 +0000 |
58 | +++ tests/qmltests/tst_Shell.qml 2016-11-22 17:01:17 +0000 |
59 | @@ -2797,5 +2797,51 @@ |
60 | |
61 | GSettingsController.setEnableIndicatorMenu(true); |
62 | } |
63 | + |
64 | + function test_spreadDisabled_data() { |
65 | + return [ |
66 | + { tag: "enabled", spreadEnabled: true }, |
67 | + { tag: "disabled", spreadEnabled: false } |
68 | + ]; |
69 | + } |
70 | + |
71 | + function test_spreadDisabled(data) { |
72 | + loadShell("phone"); |
73 | + swipeAwayGreeter(); |
74 | + var stage = findChild(shell, "stage"); |
75 | + stage.spreadEnabled = data.spreadEnabled; |
76 | + |
77 | + // Try swiping |
78 | + touchFlick(shell, shell.width - 2, shell.height / 2, units.gu(1), shell.height / 2); |
79 | + tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged"); |
80 | + |
81 | + stage.closeSpread(); |
82 | + tryCompare(stage, "state", "staged"); |
83 | + |
84 | + // Try by edge push |
85 | + mouseMove(stage, stage.width - 1, units.gu(10)); |
86 | + for (var i = 0; i < units.gu(10); i++) { |
87 | + stage.pushRightEdge(1); |
88 | + } |
89 | + mouseMove(stage, stage.width - units.gu(5), units.gu(10)); |
90 | + tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged"); |
91 | + |
92 | + stage.closeSpread(); |
93 | + tryCompare(stage, "state", "staged"); |
94 | + |
95 | + // Try by alt+tab |
96 | + keyPress(Qt.Key_Alt); |
97 | + keyClick(Qt.Key_Tab); |
98 | + tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged"); |
99 | + keyRelease(Qt.Key_Alt); |
100 | + |
101 | + stage.closeSpread(); |
102 | + tryCompare(stage, "state", "staged"); |
103 | + |
104 | + // Try by Super+W |
105 | + keyPress(Qt.Key_W, Qt.MetaModifier) |
106 | + tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged"); |
107 | + keyRelease(Qt.Key_W, Qt.MetaModifier) |
108 | + } |
109 | } |
110 | } |
Change looks and works fine; tested on my krillin with mouse edge push, alt-tab and Meta+W keyboard shortcut
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
* Did CI run pass? If not, please explain why.
Not yet, will wait with the top approval