Merge lp:~mzanetti/unity8/fix-alt-tab into lp:unity8
- fix-alt-tab
- Merge into trunk
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Michał Sawicz | ||||||||||||
Approved revision: | 2898 | ||||||||||||
Merged at revision: | 2922 | ||||||||||||
Proposed branch: | lp:~mzanetti/unity8/fix-alt-tab | ||||||||||||
Merge into: | lp:unity8 | ||||||||||||
Prerequisite: | lp:~lukas-kde/unity8/fix-window-title-vs-menu | ||||||||||||
Diff against target: |
137 lines (+94/-0) 2 files modified
qml/Stage/Stage.qml (+8/-0) tests/qmltests/tst_Shell.qml (+86/-0) |
||||||||||||
To merge this branch: | bzr merge lp:~mzanetti/unity8/fix-alt-tab | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Approve | |
Michał Sawicz | Approve | ||
Daniel d'Andrada | Pending | ||
Lukáš Tinkl | Pending | ||
Review via email: mp+321931@code.launchpad.net |
This proposal supersedes a proposal from 2017-03-29.
Commit message
make sure the stage has focus when going to spread
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 UI, has there been a design review?
n/a
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2893
https:/
Executed test runs:
SUCCESS: 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:/
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:2893
https:/
Executed test runs:
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:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Yup works fine, trivial code fix
* 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.
Yes
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
Didn't Albert have a fix for the same thing?
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
Yeah it's the "same" fix
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2896
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: 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:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
* 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.
One unrelated failure, will retrigger
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2896
https:/
Executed test runs:
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:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2898
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: 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:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2898
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: 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:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2898
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2898
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: 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:/
Click here to trigger a rebuild:
https:/
Michał Sawicz (saviq) wrote : | # |
Approving the most recent changes.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2898
https:/
Executed test runs:
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:
https:/
Preview Diff
1 | === modified file 'qml/Stage/Stage.qml' |
2 | --- qml/Stage/Stage.qml 2017-04-04 22:12:15 +0000 |
3 | +++ qml/Stage/Stage.qml 2017-04-04 22:12:15 +0000 |
4 | @@ -91,6 +91,7 @@ |
5 | |
6 | |
7 | onAltTabPressedChanged: { |
8 | + root.focus = true; |
9 | if (altTabPressed) { |
10 | if (root.spreadEnabled) { |
11 | altTabDelayTimer.start(); |
12 | @@ -477,6 +478,7 @@ |
13 | State { |
14 | name: "spread"; when: priv.goneToSpread |
15 | PropertyChanges { target: floatingFlickable; enabled: true } |
16 | + PropertyChanges { target: root; focus: true } |
17 | PropertyChanges { target: spreadItem; focus: true } |
18 | PropertyChanges { target: hoverMouseArea; enabled: true } |
19 | PropertyChanges { target: rightEdgeDragArea; enabled: false } |
20 | @@ -516,14 +518,20 @@ |
21 | State { |
22 | name: "staged"; when: root.mode === "staged" |
23 | PropertyChanges { target: wallpaper; visible: !priv.focusedAppDelegate || priv.focusedAppDelegate.x !== 0 } |
24 | + PropertyChanges { target: root; focus: true } |
25 | + PropertyChanges { target: appContainer; focus: true } |
26 | }, |
27 | State { |
28 | name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage" |
29 | PropertyChanges { target: triGestureArea; enabled: priv.sideStageEnabled } |
30 | PropertyChanges { target: sideStage; visible: true } |
31 | + PropertyChanges { target: root; focus: true } |
32 | + PropertyChanges { target: appContainer; focus: true } |
33 | }, |
34 | State { |
35 | name: "windowed"; when: root.mode === "windowed" |
36 | + PropertyChanges { target: root; focus: true } |
37 | + PropertyChanges { target: appContainer; focus: true } |
38 | } |
39 | ] |
40 | transitions: [ |
41 | |
42 | === modified file 'tests/qmltests/tst_Shell.qml' |
43 | --- tests/qmltests/tst_Shell.qml 2017-03-24 11:08:11 +0000 |
44 | +++ tests/qmltests/tst_Shell.qml 2017-04-04 22:12:15 +0000 |
45 | @@ -3170,6 +3170,92 @@ |
46 | tryCompare(menuBarLoader.item, "visible", true); |
47 | } |
48 | |
49 | + function test_enforceFocusOnStageOnAltTab() { |
50 | + loadShell("desktop"); |
51 | + shell.usageScenario = "desktop"; |
52 | + waitForRendering(shell); |
53 | + swipeAwayGreeter(); |
54 | + |
55 | + var appDelegate = startApplication("music-app") |
56 | + verify(appDelegate); |
57 | + waitForRendering(shell); |
58 | + |
59 | + var launcher = findChild(shell, "launcher"); |
60 | + launcher.focus = true; |
61 | + |
62 | + var stage = findChild(shell, "stage"); |
63 | + |
64 | + var spreadItem = findChild(shell, "spreadItem"); |
65 | + |
66 | + compare(spreadItem.highlightedIndex, -1); |
67 | + |
68 | + keyPress(Qt.Key_Alt); |
69 | + keyClick(Qt.Key_Tab); |
70 | + |
71 | + tryCompare(spreadItem, "highlightedIndex", 1); |
72 | + tryCompare(stage, "focus", true); |
73 | + |
74 | + keyClick(Qt.Key_Tab); |
75 | + |
76 | + tryCompare(spreadItem, "highlightedIndex", 0); |
77 | + |
78 | + keyRelease(Qt.Key_Alt); |
79 | + } |
80 | + |
81 | + function test_maximizedWindowMenuThenAltTab_data() { |
82 | + return [ |
83 | + { tag: "show spread", showSpread: true }, |
84 | + { tag: "do not show spread", showSpread: false }, |
85 | + ]; |
86 | + } |
87 | + |
88 | + function test_maximizedWindowMenuThenAltTab(data) { |
89 | + loadShell("desktop"); |
90 | + shell.usageScenario = "desktop"; |
91 | + waitForRendering(shell); |
92 | + swipeAwayGreeter(); |
93 | + |
94 | + var appDelegate = startApplication("gmail-webapp"); |
95 | + var appDelegate2 = startApplication("dialer-app"); |
96 | + |
97 | + tryCompare(appDelegate2.surface, "activeFocus", true); |
98 | + |
99 | + var maximizeButton = findChild(appDelegate2, "maximizeWindowButton"); |
100 | + mouseClick(maximizeButton); |
101 | + tryCompare(appDelegate2, "state", "maximized"); |
102 | + |
103 | + var panel = findChild(shell, "panel"); |
104 | + var panelMouse = findChild(panel, "windowControlArea"); |
105 | + mouseMove(panelMouse); |
106 | + var panelMenu = findChild(panel, "menuBar"); |
107 | + var menuBarLoader = findChild(panel, "menuBarLoader"); |
108 | + mouseMove(panelMenu); |
109 | + var panelMenuItem = findChild(panelMenu, "menuBar-item0"); |
110 | + tryCompare(panelMenuItem, "visible", true); |
111 | + Util.waitForBehaviors(shell); |
112 | + mouseClick(panelMenuItem); |
113 | + var panelMenuItemItem = findChild(panelMenu, "menuBar-item0-menu-item0-actionItem"); |
114 | + mouseMove(panelMenuItemItem, panelMenuItemItem.width/2, panelMenuItemItem.height/2); |
115 | + verify(panelMenuItemItem.activeFocus); |
116 | + verify(panelMenuItem.__popup); |
117 | + |
118 | + keyPress(Qt.Key_Alt); |
119 | + keyClick(Qt.Key_Tab); |
120 | + if (data.showSpread) { |
121 | + tryCompare(stage, "spreadShown", true); |
122 | + } |
123 | + tryCompareFunction(function() { return menuBarLoader.active === false; }, true); |
124 | + keyRelease(Qt.Key_Alt) |
125 | + |
126 | + tryCompare(appDelegate.surface, "activeFocus", true); |
127 | + |
128 | + keyPress(Qt.Key_Alt); |
129 | + keyClick(Qt.Key_Tab); |
130 | + keyRelease(Qt.Key_Alt) |
131 | + |
132 | + tryCompare(appDelegate2.surface, "activeFocus", true); |
133 | + } |
134 | + |
135 | function test_maximizedWindowAndMenuInPanel() { |
136 | loadShell("desktop"); |
137 | shell.usageScenario = "desktop"; |
PASSED: Continuous integration, rev:2892 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/3593/ /unity8- jenkins. ubuntu. com/job/ build/4759 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial+ overlay, testname= qmluitests. sh/2904 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= zesty,testname= qmluitests. sh/2904 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/4787 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 4610 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 4610/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/4610 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/4610/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 4610 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 4610/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/4610 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/4610/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 4610 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 4610/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/4610 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/4610/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
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: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/3593/ rebuild
https:/