Merge lp:~ci-train-bot/unity8/unity8-ubuntu-zesty-2668 into lp:unity8

Proposed by Michał Sawicz
Status: Merged
Merged at revision: 2924
Proposed branch: lp:~ci-train-bot/unity8/unity8-ubuntu-zesty-2668
Merge into: lp:unity8
Diff against target: 1317 lines (+385/-168)
28 files modified
data/unity8-dash.conf (+0/-25)
data/unity8-dash.desktop.in (+0/-1)
debian/changelog (+28/-0)
debian/unity8.install (+0/-1)
plugins/LightDM/UsersModel.cpp (+5/-0)
po/unity8.pot (+6/-6)
qml/Greeter/Greeter.qml (+1/-1)
qml/Greeter/LoginList.qml (+1/-1)
qml/Greeter/SessionsList.qml (+34/-17)
qml/Greeter/WideView.qml (+7/-5)
qml/Launcher/Drawer.qml (+43/-2)
qml/Launcher/Launcher.qml (+5/-2)
qml/Panel/Panel.qml (+8/-8)
qml/Shell.qml (+2/-3)
qml/Stage/ChildWindow.qml (+0/-4)
qml/Stage/DecoratedWindow.qml (+2/-1)
qml/Stage/Stage.qml (+25/-13)
qml/Stage/WindowDecoration.qml (+1/-0)
qml/Tutorial/TutorialContent.qml (+1/-2)
tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp (+1/-1)
tests/mocks/liblightdm/MockUsersModel.cpp (+1/-0)
tests/plugins/LightDM/IntegratedLightDM/usersmodel.cpp (+13/-0)
tests/qmltests/Greeter/tst_WideView.qml (+16/-1)
tests/qmltests/Launcher/tst_Drawer.qml (+14/-0)
tests/qmltests/Launcher/tst_Launcher.qml (+12/-0)
tests/qmltests/Panel/tst_Panel.qml (+3/-25)
tests/qmltests/Stage/tst_DesktopStage.qml (+1/-12)
tests/qmltests/tst_Shell.qml (+155/-37)
To merge this branch: bzr merge lp:~ci-train-bot/unity8/unity8-ubuntu-zesty-2668
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+322000@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'data/unity8-dash.conf'
--- data/unity8-dash.conf 2016-10-07 17:22:21 +0000
+++ data/unity8-dash.conf 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
1description "Unity Shell v8 Dash"
2author "Michael Zanetti <michael.zanetti@canonical.com>"
3
4emits scope-ui-starting
5
6start on started unity8
7stop on stopping unity8
8
9kill timeout 120
10
11# Focused app is 100 so we want to be less likely to get
12# killed than the focused app but more than Unity8
13
14oom score 50
15
16respawn
17respawn limit unlimited
18
19env APP_ID=unity8-dash
20
21pre-start script
22 initctl emit scope-ui-starting
23end script
24
25exec ${BINARY:-unity8-dash} $ARGS --desktop_file_hint=unity8-dash.desktop
260
=== modified file 'data/unity8-dash.desktop.in'
--- data/unity8-dash.desktop.in 2016-04-20 13:22:20 +0000
+++ data/unity8-dash.desktop.in 2017-04-05 14:04:26 +0000
@@ -5,5 +5,4 @@
5Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-dash5Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-dash
6Terminal=false6Terminal=false
7Icon=@CMAKE_INSTALL_PREFIX@/@SHELL_APP_DIR@/Dash/unity8-dash.png7Icon=@CMAKE_INSTALL_PREFIX@/@SHELL_APP_DIR@/Dash/unity8-dash.png
8NoDisplay=true
9X-Ubuntu-Touch=true8X-Ubuntu-Touch=true
109
=== modified file 'debian/changelog'
--- debian/changelog 2017-03-28 21:50:21 +0000
+++ debian/changelog 2017-04-05 14:04:26 +0000
@@ -1,3 +1,31 @@
1unity8 (8.15+17.04.20170404.7-0ubuntu1) zesty; urgency=medium
2
3 [ Albert Astals Cid ]
4 * Tweak app drawer a bit (LP: #1667570)
5
6 [ Josh Arenson ]
7 * Make some small changes to the greeter's session list
8 * Handle a user in the greeter having never selected a session better
9 (LP: #1673199)
10
11 [ Lukáš Tinkl ]
12 * Do not occlude windows with an ongoing unmaximize transition (LP:
13 #1666363)
14 * Show and implement close buttons for child windows (LP: #1668053)
15 * Sanitize the logic for pointer vs. touch menus, fixes hiding the
16 window title in staged mode, when hovering the panel with mouse and
17 no menus available.
18
19 [ Michael Zanetti ]
20 * Don't hide the launcher on super press if it's locked visible (LP:
21 #1675373)
22 * fix searchfield selection in drawer (LP: #1677259)
23 * make sure the stage has focus when going to spread (LP: #1672053,
24 #1672673, #1676995)
25 * don't autostart the dash app, but show its .desktop file instead
26
27 -- Michał Sawicz <michal.sawicz@canonical.com> Tue, 04 Apr 2017 22:56:06 +0000
28
1unity8 (8.15+17.04.20170328.3-0ubuntu1) zesty; urgency=medium29unity8 (8.15+17.04.20170328.3-0ubuntu1) zesty; urgency=medium
230
3 [ Albert Astals Cid ]31 [ Albert Astals Cid ]
432
=== modified file 'debian/unity8.install'
--- debian/unity8.install 2016-10-04 16:21:38 +0000
+++ debian/unity8.install 2017-04-05 14:04:26 +0000
@@ -1,6 +1,5 @@
1debian/usr.bin.unity8-dash etc/apparmor.d1debian/usr.bin.unity8-dash etc/apparmor.d
2var/lib/unity8/version2var/lib/unity8/version
3data/unity8-dash.conf usr/share/upstart/sessions/
4data/unity8-filewatcher.conf usr/share/upstart/sessions/3data/unity8-filewatcher.conf usr/share/upstart/sessions/
5data/unity8.conf usr/share/upstart/sessions/4data/unity8.conf usr/share/upstart/sessions/
6data/devices.conf etc/ubuntu/5data/devices.conf etc/ubuntu/
76
=== modified file 'plugins/LightDM/UsersModel.cpp'
--- plugins/LightDM/UsersModel.cpp 2017-01-19 15:25:53 +0000
+++ plugins/LightDM/UsersModel.cpp 2017-04-05 14:04:26 +0000
@@ -109,6 +109,11 @@
109 variantData = stringData;109 variantData = stringData;
110 }110 }
111111
112 // Workaround for liblightdm returning "" when a user has no default session
113 if (Q_UNLIKELY(role == QLightDM::UsersModel::SessionRole && variantData.toString().isEmpty())) {
114 variantData = Greeter::instance()->defaultSessionHint();
115 }
116
112 return variantData;117 return variantData;
113}118}
114119
115120
=== modified file 'po/unity8.pot'
--- po/unity8.pot 2017-03-28 21:50:21 +0000
+++ po/unity8.pot 2017-04-05 14:04:26 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: unity8\n"9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2017-03-28 21:50+0000\n"11"POT-Creation-Date: 2017-04-04 22:56+0000\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -42,11 +42,11 @@
42msgid "Retry"42msgid "Retry"
43msgstr ""43msgstr ""
4444
45#: plugins/LightDM/UsersModel.cpp:15245#: plugins/LightDM/UsersModel.cpp:157
46msgid "Login"46msgid "Login"
47msgstr ""47msgstr ""
4848
49#: plugins/LightDM/UsersModel.cpp:16049#: plugins/LightDM/UsersModel.cpp:165
50msgid "Guest Session"50msgid "Guest Session"
51msgstr ""51msgstr ""
5252
@@ -521,15 +521,15 @@
521msgid "Passcode"521msgid "Passcode"
522msgstr ""522msgstr ""
523523
524#: qml/Greeter/SessionsList.qml:122524#: qml/Greeter/SessionsList.qml:124
525msgid "Select desktop environment"525msgid "Select desktop environment"
526msgstr ""526msgstr ""
527527
528#: qml/Launcher/Drawer.qml:93528#: qml/Launcher/Drawer.qml:94
529msgid "Search…"529msgid "Search…"
530msgstr ""530msgstr ""
531531
532#: qml/Launcher/Drawer.qml:128532#: qml/Launcher/Drawer.qml:129
533msgctxt "Apps sorted alphabetically"533msgctxt "Apps sorted alphabetically"
534msgid "A-Z"534msgid "A-Z"
535msgstr ""535msgstr ""
536536
=== modified file 'qml/Greeter/Greeter.qml'
--- qml/Greeter/Greeter.qml 2017-03-22 20:14:44 +0000
+++ qml/Greeter/Greeter.qml 2017-04-05 14:04:26 +0000
@@ -102,7 +102,7 @@
102 show();102 show();
103 d.startUnlock(false /* toTheRight */);103 d.startUnlock(false /* toTheRight */);
104 }104 }
105 } else if (appId !== "unity8-dash") { // dash isn't started by user105 } else {
106 d.startUnlock(false /* toTheRight */);106 d.startUnlock(false /* toTheRight */);
107 }107 }
108 }108 }
109109
=== modified file 'qml/Greeter/LoginList.qml'
--- qml/Greeter/LoginList.qml 2017-01-24 07:40:40 +0000
+++ qml/Greeter/LoginList.qml 2017-04-05 14:04:26 +0000
@@ -35,7 +35,7 @@
35 readonly property int cellHeight: units.gu(5)35 readonly property int cellHeight: units.gu(5)
36 readonly property int highlightedHeight: highlightItem.height36 readonly property int highlightedHeight: highlightItem.height
37 readonly property int moveDuration: UbuntuAnimation.FastDuration37 readonly property int moveDuration: UbuntuAnimation.FastDuration
38 property string currentSession38 property string currentSession // Initially set by LightDM
39 readonly property string currentUser: userList.currentItem.username39 readonly property string currentUser: userList.currentItem.username
4040
41 signal responded(string response)41 signal responded(string response)
4242
=== modified file 'qml/Greeter/SessionsList.qml'
--- qml/Greeter/SessionsList.qml 2016-12-19 19:55:07 +0000
+++ qml/Greeter/SessionsList.qml 2017-04-05 14:04:26 +0000
@@ -24,22 +24,24 @@
24 id: root24 id: root
25 objectName: "sessionsList"25 objectName: "sessionsList"
2626
27 property string initiallySelectedSession
28 signal sessionSelected(string sessionKey)27 signal sessionSelected(string sessionKey)
29 signal showLoginList()28 signal showLoginList()
3029
31 onInitiallySelectedSessionChanged: {30 // Sets the position of the background highlight
32 sessionsList.currentIndex = getSelectedIndex();31 function updateHighlight(session) {
33 sessionsList.positionViewAtIndex(sessionsList.currentIndex, ListView.Contain);32 sessionsList.currentIndex = getIndexOfSession(session);
33 sessionsList.currentItem.initialSession = session;
34 }34 }
3535
36 function getSelectedIndex() {36 function getIndexOfSession(session) {
37 for (var i = 0; i < sessionsList.model.count; i++) {37 for (var i = 0; i < sessionsList.model.count; i++) {
38 var key = sessionsList.model.get(i).key38 var key = sessionsList.model.get(i).key;
39 if (key === initiallySelectedSession) {39 if (key === session) {
40 return i;40 return i;
41 }41 }
42 }42 }
43
44 return 0; // Just choose the first session
43 }45 }
4446
45 function currentKey() {47 function currentKey() {
@@ -49,7 +51,8 @@
49 }51 }
5052
51 Keys.onEnterPressed: {53 Keys.onEnterPressed: {
52 showLoginList(); // Session is already selected54 sessionSelected(currentKey());
55 showLoginList();
53 event.accepted = true;56 event.accepted = true;
54 }57 }
5558
@@ -59,6 +62,7 @@
59 }62 }
6063
61 Keys.onReturnPressed: {64 Keys.onReturnPressed: {
65 sessionSelected(currentKey());
62 showLoginList();66 showLoginList();
63 event.accepted = true;67 event.accepted = true;
64 }68 }
@@ -66,20 +70,18 @@
66 Keys.onDownPressed: {70 Keys.onDownPressed: {
67 if (sessionsList.currentIndex < sessionsList.model.count - 1)71 if (sessionsList.currentIndex < sessionsList.model.count - 1)
68 sessionsList.currentIndex++;72 sessionsList.currentIndex++;
69 sessionSelected(currentKey());
70 event.accepted = true;73 event.accepted = true;
71 }74 }
7275
73 Keys.onUpPressed: {76 Keys.onUpPressed: {
74 if (sessionsList.currentIndex > 0)77 if (sessionsList.currentIndex > 0)
75 sessionsList.currentIndex--;78 sessionsList.currentIndex--;
76 sessionSelected(currentKey());
77 event.accepted = true;79 event.accepted = true;
78 }80 }
7981
80 LoginAreaContainer {82 LoginAreaContainer {
81 readonly property real margins: sessionsList.anchors.margins83 readonly property real margins: sessionsList.anchors.margins
82 readonly property real prefferedHeight: {84 readonly property real preferredHeight: {
83 if (sessionsList.currentItem) {85 if (sessionsList.currentItem) {
84 return (sessionsList.currentItem.height *86 return (sessionsList.currentItem.height *
85 (1 + sessionsList.model.count)) + 2 * margins87 (1 + sessionsList.model.count)) + 2 * margins
@@ -88,7 +90,7 @@
88 }90 }
89 }91 }
9092
91 height: prefferedHeight < parent.height ? prefferedHeight : parent.height - units.gu(4)93 height: preferredHeight < parent.height ? preferredHeight : parent.height - units.gu(4)
92 width: parent.width94 width: parent.width
9395
94 anchors {96 anchors {
@@ -107,8 +109,8 @@
107 margins: units.gu(2)109 margins: units.gu(2)
108 }110 }
109111
110 height: parent.height - headerItem.height112 clip: true
111113 height: parent.height - units.gu(2.5)
112 boundsBehavior: Flickable.StopAtBounds114 boundsBehavior: Flickable.StopAtBounds
113115
114 model: LightDMService.sessions116 model: LightDMService.sessions
@@ -135,14 +137,18 @@
135 }137 }
136138
137 headerPositioning: ListView.OverlayHeader139 headerPositioning: ListView.OverlayHeader
140
141 // The highlighting is all self-managed, so account for that
138 highlightFollowsCurrentItem: false142 highlightFollowsCurrentItem: false
143 highlight: QtObject {}
139144
140 delegate: ListItem {145 delegate: ListItem {
141 id: delegate146 id: delegate
142 objectName: "sessionDelegate" + index147 objectName: "sessionDelegate" + index
143148
149 property string initialSession: ""
150
144 divider.visible: false151 divider.visible: false
145
146 visible: y > sessionsList.headerItem.y152 visible: y > sessionsList.headerItem.y
147 + sessionsList.headerItem.height153 + sessionsList.headerItem.height
148 - sessionsList.anchors.margins154 - sessionsList.anchors.margins
@@ -157,6 +163,16 @@
157 }163 }
158164
159 Rectangle {165 Rectangle {
166 id: backgroundHighlight
167
168 height: sessionsList.currentItem.height
169 width: sessionsList.currentItem.width
170 color: theme.palette.normal.selection
171
172 visible: initialSession === key && !!key
173 }
174
175 Rectangle {
160 height: parent.height176 height: parent.height
161 width: parent.width177 width: parent.width
162 color: "transparent"178 color: "transparent"
@@ -171,15 +187,16 @@
171 ListItemLayout {187 ListItemLayout {
172 id: layout188 id: layout
173189
190 readonly property color itemColor: theme.palette.normal.raisedText
174 SessionIcon {191 SessionIcon {
175 id: sessionIcon192 id: sessionIcon
176 source: icon_url193 source: icon_url
177 SlotsLayout.position: SlotsLayout.Leading194 SlotsLayout.position: SlotsLayout.Leading
178 color: theme.palette.normal.raisedSecondaryText195 color: parent.itemColor
179 }196 }
180197
181 title.text: display198 title.text: display
182 title.color: theme.palette.normal.raisedText199 title.color: itemColor
183 }200 }
184 }201 }
185 }202 }
186203
=== modified file 'qml/Greeter/WideView.qml'
--- qml/Greeter/WideView.qml 2017-03-22 20:14:44 +0000
+++ qml/Greeter/WideView.qml 2017-04-05 14:04:26 +0000
@@ -20,6 +20,8 @@
2020
21FocusScope {21FocusScope {
22 id: root22 id: root
23 objectName: "WideView"
24
23 focus: true25 focus: true
2426
25 property alias background: coverPage.background27 property alias background: coverPage.background
@@ -32,13 +34,13 @@
32 property int delayMinutes // TODO34 property int delayMinutes // TODO
33 property alias alphanumeric: loginList.alphanumeric35 property alias alphanumeric: loginList.alphanumeric
34 property alias locked: loginList.locked36 property alias locked: loginList.locked
35 property alias sessionToStart: loginList.currentSession
36 property alias waiting: loginList.waiting37 property alias waiting: loginList.waiting
37 property var userModel // Set from outside38 property var userModel // Set from outside
3839
39 readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running40 readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
40 readonly property bool fullyShown: coverPage.showProgress === 141 readonly property bool fullyShown: coverPage.showProgress === 1
41 readonly property bool required: coverPage.required42 readonly property bool required: coverPage.required
43 readonly property alias sessionToStart: loginList.currentSession
4244
43 // so that it can be replaced in tests with a mock object45 // so that it can be replaced in tests with a mock object
44 property var inputMethod: Qt.inputMethod46 property var inputMethod: Qt.inputMethod
@@ -144,6 +146,7 @@
144146
145 height: loginList.height147 height: loginList.height
146 width: loginList.width148 width: loginList.width
149
147 anchors {150 anchors {
148 left: parent.left151 left: parent.left
149 leftMargin: Math.min(parent.width * 0.16, units.gu(20))152 leftMargin: Math.min(parent.width * 0.16, units.gu(20))
@@ -153,10 +156,9 @@
153 active: false156 active: false
154157
155 onLoaded: sessionChooserLoader.item.forceActiveFocus();158 onLoaded: sessionChooserLoader.item.forceActiveFocus();
156 Binding {159 onActiveChanged: {
157 target: sessionChooserLoader.item160 if (!active) return;
158 property: "initiallySelectedSession"161 item.updateHighlight(loginList.currentSession);
159 value: loginList.currentSession
160 }162 }
161163
162 Connections {164 Connections {
163165
=== modified file 'qml/Launcher/Drawer.qml'
--- qml/Launcher/Drawer.qml 2017-03-24 11:51:31 +0000
+++ qml/Launcher/Drawer.qml 2017-04-05 14:04:26 +0000
@@ -28,6 +28,7 @@
28 property int panelWidth: 028 property int panelWidth: 0
29 readonly property bool moving: listLoader.item && listLoader.item.moving29 readonly property bool moving: listLoader.item && listLoader.item.moving
30 readonly property Item searchTextField: searchField30 readonly property Item searchTextField: searchField
31 readonly property real delegateWidth: units.gu(10)
3132
32 signal applicationSelected(string appId)33 signal applicationSelected(string appId)
3334
@@ -272,7 +273,7 @@
272273
273 model: sortProxyModel274 model: sortProxyModel
274275
275 delegateWidth: units.gu(8)276 delegateWidth: root.delegateWidth
276 delegateHeight: units.gu(10)277 delegateHeight: units.gu(10)
277 delegate: drawerDelegateComponent278 delegate: drawerDelegateComponent
278 }279 }
@@ -332,7 +333,7 @@
332 filterLetter: model.letter333 filterLetter: model.letter
333 dynamicSortFilter: false334 dynamicSortFilter: false
334 }335 }
335 delegateWidth: units.gu(8)336 delegateWidth: root.delegateWidth
336 delegateHeight: units.gu(10)337 delegateHeight: units.gu(10)
337 delegate: drawerDelegateComponent338 delegate: drawerDelegateComponent
338 }339 }
@@ -352,6 +353,7 @@
352 readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus353 readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus
353354
354 onClicked: root.applicationSelected(model.appId)355 onClicked: root.applicationSelected(model.appId)
356 z: loader.active ? 1 : 0
355357
356 Column {358 Column {
357 width: units.gu(8)359 width: units.gu(8)
@@ -384,11 +386,50 @@
384 }386 }
385387
386 Label {388 Label {
389 id: label
387 text: model.name390 text: model.name
388 width: parent.width391 width: parent.width
389 horizontalAlignment: Text.AlignHCenter392 horizontalAlignment: Text.AlignHCenter
390 fontSize: "small"393 fontSize: "small"
391 elide: Text.ElideRight394 elide: Text.ElideRight
395
396 Loader {
397 id: loader
398 x: {
399 var aux = 0;
400 if (item) {
401 aux = label.width / 2 - item.width / 2;
402 var containerXMap = mapToItem(contentContainer, aux, 0).x
403 if (containerXMap < 0) {
404 aux = aux - containerXMap;
405 containerXMap = 0;
406 }
407 if (containerXMap + item.width > contentContainer.width) {
408 aux = aux - (containerXMap + item.width - contentContainer.width);
409 }
410 }
411 return aux;
412 }
413 y: -units.gu(0.5)
414 active: label.truncated && (drawerDelegate.hovered || drawerDelegate.focused)
415 sourceComponent: Rectangle {
416 color: UbuntuColors.jet
417 width: fullLabel.contentWidth + units.gu(1)
418 height: fullLabel.height + units.gu(1)
419 radius: units.dp(4)
420 Label {
421 id: fullLabel
422 width: Math.min(root.delegateWidth * 2, implicitWidth)
423 wrapMode: Text.Wrap
424 horizontalAlignment: Text.AlignHCenter
425 maximumLineCount: 3
426 elide: Text.ElideRight
427 anchors.centerIn: parent
428 text: model.name
429 fontSize: "small"
430 }
431 }
432 }
392 }433 }
393 }434 }
394 }435 }
395436
=== modified file 'qml/Launcher/Launcher.qml'
--- qml/Launcher/Launcher.qml 2017-03-21 10:54:59 +0000
+++ qml/Launcher/Launcher.qml 2017-04-05 14:04:26 +0000
@@ -75,7 +75,7 @@
75 } else {75 } else {
76 superPressTimer.stop();76 superPressTimer.stop();
77 superLongPressTimer.stop();77 superLongPressTimer.stop();
78 switchToNextState("");78 switchToNextState(root.lockedVisible ? "visible" : "");
79 panel.shortcutHintsShown = false;79 panel.shortcutHintsShown = false;
80 }80 }
81 }81 }
@@ -88,7 +88,7 @@
88 superPressTimer.stop();88 superPressTimer.stop();
89 superLongPressTimer.stop();89 superLongPressTimer.stop();
90 } else {90 } else {
91 switchToNextState("");91 switchToNextState(root.lockedVisible ? "visible" : "");
92 root.focus = false;92 root.focus = false;
93 if (panel.highlightIndex == -1) {93 if (panel.highlightIndex == -1) {
94 root.showDashHome();94 root.showDashHome();
@@ -368,8 +368,11 @@
368 // Remove (and put back) the focus for the searchfield in368 // Remove (and put back) the focus for the searchfield in
369 // order to hide the copy/paste popover when we move the drawer369 // order to hide the copy/paste popover when we move the drawer
370 var hadFocus = drawer.searchTextField.focus;370 var hadFocus = drawer.searchTextField.focus;
371 var oldSelectionStart = drawer.searchTextField.selectionStart;
372 var oldSelectionEnd = drawer.searchTextField.selectionEnd;
371 drawer.searchTextField.focus = false;373 drawer.searchTextField.focus = false;
372 drawer.searchTextField.focus = hadFocus;374 drawer.searchTextField.focus = hadFocus;
375 drawer.searchTextField.select(oldSelectionStart, oldSelectionEnd);
373 }376 }
374 }377 }
375 width: Math.min(root.width, units.gu(90)) * .9378 width: Math.min(root.width, units.gu(90)) * .9
376379
=== modified file 'qml/Panel/Panel.qml'
--- qml/Panel/Panel.qml 2017-03-21 10:55:52 +0000
+++ qml/Panel/Panel.qml 2017-04-05 14:04:26 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2013-2016 Canonical, Ltd.2 * Copyright (C) 2013-2017 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -85,15 +85,15 @@
85 property bool showWindowDecorationControls: (revealControls && PanelState.decorationsVisible) ||85 property bool showWindowDecorationControls: (revealControls && PanelState.decorationsVisible) ||
86 PanelState.decorationsAlwaysVisible86 PanelState.decorationsAlwaysVisible
8787
88 property bool showPointerMenu: revealControls &&88 property bool showPointerMenu: revealControls && enablePointerMenu &&
89 (PanelState.decorationsVisible || mode == "staged")89 (PanelState.decorationsVisible || mode == "staged")
9090
91 property bool enablePointerMenu: revealControls &&91 property bool enablePointerMenu: applicationMenus.available &&
92 applicationMenus.available &&
93 applicationMenus.model92 applicationMenus.model
9493
95 property bool showTouchMenu: !greeterShown &&94 property bool showTouchMenu: !greeterShown &&
96 !showPointerMenu95 !showPointerMenu &&
96 !showWindowDecorationControls
9797
98 property bool enableTouchMenus: showTouchMenu &&98 property bool enableTouchMenus: showTouchMenu &&
99 applicationMenus.available &&99 applicationMenus.available &&
@@ -211,7 +211,7 @@
211 opacity: d.showPointerMenu ? 1 : 0211 opacity: d.showPointerMenu ? 1 : 0
212 visible: opacity != 0212 visible: opacity != 0
213 Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }213 Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
214 active: __applicationMenus.model && !callHint.visible214 active: d.showPointerMenu && !callHint.visible
215215
216 width: parent.width - windowControlButtons.width - units.gu(2) - __indicators.barWidth216 width: parent.width - windowControlButtons.width - units.gu(2) - __indicators.barWidth
217217
@@ -220,7 +220,7 @@
220 sourceComponent: MenuBar {220 sourceComponent: MenuBar {
221 id: bar221 id: bar
222 objectName: "menuBar"222 objectName: "menuBar"
223 anchors.left: parent.left223 anchors.left: parent ? parent.left : undefined
224 anchors.margins: units.gu(1)224 anchors.margins: units.gu(1)
225 height: menuBarLoader.height225 height: menuBarLoader.height
226 enableKeyFilter: valid && PanelState.decorationsVisible226 enableKeyFilter: valid && PanelState.decorationsVisible
@@ -339,7 +339,7 @@
339 maximumLineCount: 1339 maximumLineCount: 1
340 fontSize: "medium"340 fontSize: "medium"
341 font.weight: Font.Medium341 font.weight: Font.Medium
342 color: Theme.palette.selected.backgroundText342 color: theme.palette.selected.backgroundText
343 opacity: __applicationMenus.visible && !__applicationMenus.expanded ? 1 : 0343 opacity: __applicationMenus.visible && !__applicationMenus.expanded ? 1 : 0
344 visible: opacity != 0344 visible: opacity != 0
345 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }345 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
346346
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2017-03-24 14:04:50 +0000
+++ qml/Shell.qml 2017-04-05 14:04:26 +0000
@@ -110,7 +110,7 @@
110 }110 }
111 }111 }
112 function _onMainAppChanged(appId) {112 function _onMainAppChanged(appId) {
113 if (wizard.active && appId != "" && appId != "unity8-dash") {113 if (wizard.active && appId != "") {
114 // If this happens on first boot, we may be in the114 // If this happens on first boot, we may be in the
115 // wizard while receiving a call. But a call is more115 // wizard while receiving a call. But a call is more
116 // important than the wizard so just bail out of it.116 // important than the wizard so just bail out of it.
@@ -241,8 +241,7 @@
241 onHomeKeyActivated: {241 onHomeKeyActivated: {
242 // Ignore when greeter is active, to avoid pocket presses242 // Ignore when greeter is active, to avoid pocket presses
243 if (!greeter.active) {243 if (!greeter.active) {
244 launcher.fadeOut();244 launcher.openDrawer(false);
245 ApplicationManager.requestFocusApplication("unity8-dash");
246 }245 }
247 }246 }
248 onTouchBegun: { cursor.opacity = 0; }247 onTouchBegun: { cursor.opacity = 0; }
249248
=== modified file 'qml/Stage/ChildWindow.qml'
--- qml/Stage/ChildWindow.qml 2017-03-24 14:04:50 +0000
+++ qml/Stage/ChildWindow.qml 2017-04-05 14:04:26 +0000
@@ -104,10 +104,6 @@
104 height: root.decorationHeight104 height: root.decorationHeight
105 title: root.surface ? root.surface.name : ""105 title: root.surface ? root.surface.name : ""
106 active: root.surface ? root.surface.focused : false106 active: root.surface ? root.surface.focused : false
107 closeButtonVisible: root.surface ? root.surface.type === Mir.SatelliteType
108 || root.surface.type === Mir.NormalType
109 || root.surface.type === Mir.UtilityType
110 : false
111 minimizeButtonVisible: false107 minimizeButtonVisible: false
112 maximizeButtonShown: false108 maximizeButtonShown: false
113 onPressed: root.surface.activate();109 onPressed: root.surface.activate();
114110
=== modified file 'qml/Stage/DecoratedWindow.qml'
--- qml/Stage/DecoratedWindow.qml 2017-03-24 14:04:50 +0000
+++ qml/Stage/DecoratedWindow.qml 2017-04-05 14:04:26 +0000
@@ -38,6 +38,7 @@
38 property alias maximizeButtonShown: decoration.maximizeButtonShown38 property alias maximizeButtonShown: decoration.maximizeButtonShown
39 property alias interactive: applicationWindow.interactive39 property alias interactive: applicationWindow.interactive
40 readonly property alias orientationChangesEnabled: applicationWindow.orientationChangesEnabled40 readonly property alias orientationChangesEnabled: applicationWindow.orientationChangesEnabled
41 property alias windowControlButtonsVisible: decoration.windowControlButtonsVisible
4142
42 // Changing this will actually add/remove a decoration, meaning, requestedHeight will take the decoration into account.43 // Changing this will actually add/remove a decoration, meaning, requestedHeight will take the decoration into account.
43 property bool hasDecoration: true44 property bool hasDecoration: true
@@ -210,7 +211,7 @@
210211
211 WindowDecoration {212 WindowDecoration {
212 id: decoration213 id: decoration
213 closeButtonVisible: root.application.appId !== "unity8-dash"214 closeButtonVisible: true
214 objectName: "appWindowDecoration"215 objectName: "appWindowDecoration"
215216
216 anchors { left: parent.left; top: parent.top; right: parent.right }217 anchors { left: parent.left; top: parent.top; right: parent.right }
217218
=== modified file 'qml/Stage/Stage.qml'
--- qml/Stage/Stage.qml 2017-03-28 21:46:37 +0000
+++ qml/Stage/Stage.qml 2017-04-05 14:04:26 +0000
@@ -91,6 +91,7 @@
9191
9292
93 onAltTabPressedChanged: {93 onAltTabPressedChanged: {
94 root.focus = true;
94 if (altTabPressed) {95 if (altTabPressed) {
95 if (root.spreadEnabled) {96 if (root.spreadEnabled) {
96 altTabDelayTimer.start();97 altTabDelayTimer.start();
@@ -171,7 +172,7 @@
171 id: closeFocusedShortcut172 id: closeFocusedShortcut
172 shortcut: Qt.AltModifier|Qt.Key_F4173 shortcut: Qt.AltModifier|Qt.Key_F4
173 onTriggered: {174 onTriggered: {
174 if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {175 if (priv.focusedAppDelegate) {
175 priv.focusedAppDelegate.close();176 priv.focusedAppDelegate.close();
176 }177 }
177 }178 }
@@ -390,7 +391,7 @@
390 Binding {391 Binding {
391 target: PanelState392 target: PanelState
392 property: "decorationsVisible"393 property: "decorationsVisible"
393 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized // FIXME for Locally integrated menus394 value: mode == "windowed" && priv.focusedAppDelegate && priv.focusedAppDelegate.maximized && !root.spreadShown
394 }395 }
395396
396 Binding {397 Binding {
@@ -431,7 +432,7 @@
431 Binding {432 Binding {
432 target: PanelState433 target: PanelState
433 property: "closeButtonShown"434 property: "closeButtonShown"
434 value: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized && !priv.focusedAppDelegate.isDash435 value: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized
435 }436 }
436437
437 Component.onDestruction: {438 Component.onDestruction: {
@@ -477,6 +478,7 @@
477 State {478 State {
478 name: "spread"; when: priv.goneToSpread479 name: "spread"; when: priv.goneToSpread
479 PropertyChanges { target: floatingFlickable; enabled: true }480 PropertyChanges { target: floatingFlickable; enabled: true }
481 PropertyChanges { target: root; focus: true }
480 PropertyChanges { target: spreadItem; focus: true }482 PropertyChanges { target: spreadItem; focus: true }
481 PropertyChanges { target: hoverMouseArea; enabled: true }483 PropertyChanges { target: hoverMouseArea; enabled: true }
482 PropertyChanges { target: rightEdgeDragArea; enabled: false }484 PropertyChanges { target: rightEdgeDragArea; enabled: false }
@@ -516,14 +518,20 @@
516 State {518 State {
517 name: "staged"; when: root.mode === "staged"519 name: "staged"; when: root.mode === "staged"
518 PropertyChanges { target: wallpaper; visible: !priv.focusedAppDelegate || priv.focusedAppDelegate.x !== 0 }520 PropertyChanges { target: wallpaper; visible: !priv.focusedAppDelegate || priv.focusedAppDelegate.x !== 0 }
521 PropertyChanges { target: root; focus: true }
522 PropertyChanges { target: appContainer; focus: true }
519 },523 },
520 State {524 State {
521 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"525 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
522 PropertyChanges { target: triGestureArea; enabled: priv.sideStageEnabled }526 PropertyChanges { target: triGestureArea; enabled: priv.sideStageEnabled }
523 PropertyChanges { target: sideStage; visible: true }527 PropertyChanges { target: sideStage; visible: true }
528 PropertyChanges { target: root; focus: true }
529 PropertyChanges { target: appContainer; focus: true }
524 },530 },
525 State {531 State {
526 name: "windowed"; when: root.mode === "windowed"532 name: "windowed"; when: root.mode === "windowed"
533 PropertyChanges { target: root; focus: true }
534 PropertyChanges { target: appContainer; focus: true }
527 }535 }
528 ]536 ]
529 transitions: [537 transitions: [
@@ -606,9 +614,7 @@
606 }614 }
607615
608 onCloseCurrentApp: {616 onCloseCurrentApp: {
609 if (!appRepeater.itemAt(highlightedIndex).isDash) {617 appRepeater.itemAt(highlightedIndex).close();
610 appRepeater.itemAt(highlightedIndex).close();
611 }
612 }618 }
613 }619 }
614620
@@ -1380,11 +1386,11 @@
1380 requestedX: root.availableDesktopArea.x;1386 requestedX: root.availableDesktopArea.x;
1381 requestedY: 0;1387 requestedY: 0;
1382 visuallyMinimized: false;1388 visuallyMinimized: false;
1383 visuallyMaximized: true
1384 requestedWidth: root.availableDesktopArea.width;1389 requestedWidth: root.availableDesktopArea.width;
1385 requestedHeight: appContainer.height;1390 requestedHeight: appContainer.height;
1386 }1391 }
1387 PropertyChanges { target: touchControls; enabled: true }1392 PropertyChanges { target: touchControls; enabled: true }
1393 PropertyChanges { target: decoratedWindow; windowControlButtonsVisible: false }
1388 },1394 },
1389 State {1395 State {
1390 name: "fullscreen"; when: appDelegate.fullscreen && !appDelegate.minimized1396 name: "fullscreen"; when: appDelegate.fullscreen && !appDelegate.minimized
@@ -1403,11 +1409,10 @@
1403 PropertyChanges {1409 PropertyChanges {
1404 target: appDelegate1410 target: appDelegate
1405 visuallyMinimized: false1411 visuallyMinimized: false
1406 visuallyMaximized: false
1407 }1412 }
1408 PropertyChanges { target: touchControls; enabled: true }1413 PropertyChanges { target: touchControls; enabled: true }
1409 PropertyChanges { target: resizeArea; enabled: true }1414 PropertyChanges { target: resizeArea; enabled: true }
1410 PropertyChanges { target: decoratedWindow; shadowOpacity: .3}1415 PropertyChanges { target: decoratedWindow; shadowOpacity: .3; windowControlButtonsVisible: true}
1411 },1416 },
1412 State {1417 State {
1413 name: "restored";1418 name: "restored";
@@ -1596,11 +1601,18 @@
1596 to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"1601 to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1597 enabled: appDelegate.animationsEnabled1602 enabled: appDelegate.animationsEnabled
1598 SequentialAnimation {1603 SequentialAnimation {
1604 ScriptAction { script: {
1605 if (appDelegate.visuallyMaximized) visuallyMaximized = false; // maximized before -> going to restored
1606 }
1607 }
1599 PropertyAction { target: appDelegate; property: "visuallyMinimized" }1608 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1600 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,opacity,scale,requestedWidth,requestedHeight,windowedWidth,windowedHeight";1609 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,opacity,scale,requestedWidth,requestedHeight,windowedWidth,windowedHeight";
1601 duration: priv.animationDuration }1610 duration: priv.animationDuration }
1602 PropertyAction { target: appDelegate; property: "visuallyMaximized" }1611 ScriptAction { script: {
1603 ScriptAction { script: { fakeRectangle.stop(); } }1612 fakeRectangle.stop();
1613 appDelegate.visuallyMaximized = appDelegate.maximized; // reflect the target state
1614 }
1615 }
1604 }1616 }
1605 }1617 }
1606 ]1618 ]
@@ -1741,7 +1753,7 @@
1741 objectName: "dragArea"1753 objectName: "dragArea"
1742 anchors.fill: decoratedWindow1754 anchors.fill: decoratedWindow
1743 enabled: false1755 enabled: false
1744 closeable: !appDelegate.isDash1756 closeable: true
17451757
1746 onClicked: {1758 onClicked: {
1747 spreadItem.highlightedIndex = index;1759 spreadItem.highlightedIndex = index;
@@ -1784,7 +1796,7 @@
1784 objectName: "closeMouseArea"1796 objectName: "closeMouseArea"
1785 anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 + spreadMaths.closeIconOffset }1797 anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 + spreadMaths.closeIconOffset }
1786 readonly property var mousePos: hoverMouseArea.mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)1798 readonly property var mousePos: hoverMouseArea.mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
1787 visible: !appDelegate.isDash && dragArea.distance == 01799 visible: dragArea.distance == 0
1788 && index == spreadItem.highlightedIndex1800 && index == spreadItem.highlightedIndex
1789 && mousePos.y < (decoratedWindow.height / 3)1801 && mousePos.y < (decoratedWindow.height / 3)
1790 && mousePos.y > -units.gu(4)1802 && mousePos.y > -units.gu(4)
17911803
=== modified file 'qml/Stage/WindowDecoration.qml'
--- qml/Stage/WindowDecoration.qml 2017-03-01 12:18:59 +0000
+++ qml/Stage/WindowDecoration.qml 2017-04-05 14:04:26 +0000
@@ -34,6 +34,7 @@
34 property var menu: undefined34 property var menu: undefined
35 property bool enableMenus: true35 property bool enableMenus: true
36 property bool windowMoving: false36 property bool windowMoving: false
37 property alias windowControlButtonsVisible: buttons.visible
3738
38 readonly property real buttonsWidth: buttons.width + row.spacing39 readonly property real buttonsWidth: buttons.width + row.spacing
3940
4041
=== modified file 'qml/Tutorial/TutorialContent.qml'
--- qml/Tutorial/TutorialContent.qml 2016-05-19 17:23:12 +0000
+++ qml/Tutorial/TutorialContent.qml 2017-04-05 14:04:26 +0000
@@ -153,8 +153,7 @@
153 paused: root.paused153 paused: root.paused
154154
155 skipped: tutorialLeftLongLoader.skipped155 skipped: tutorialLeftLongLoader.skipped
156 isReady: tutorialTopLoader.skipped && !skipped && !paused && !delayed &&156 isReady: tutorialTopLoader.skipped && !skipped && !paused && !delayed
157 ApplicationManager.focusedApplicationId != "unity8-dash"
158157
159 InactivityTimer {158 InactivityTimer {
160 id: tutorialLeftLongTimer159 id: tutorialLeftLongTimer
161160
=== modified file 'tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp'
--- tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-01-16 11:12:00 +0000
+++ tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-04-05 14:04:26 +0000
@@ -46,7 +46,7 @@
46 m_list.append(item);46 m_list.append(item);
47 item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this);47 item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this);
48 m_list.append(item);48 m_list.append(item);
49 item = new MockLauncherItem("libreoffice", "/usr/share/applications/libreoffice.desktop","Libre Office", "libreoffice", this);49 item = new MockLauncherItem("libreoffice", "/usr/share/applications/libreoffice.desktop","Libre Office Writer", "libreoffice", this);
50 m_list.append(item);50 m_list.append(item);
5151
52 qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);52 qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);
5353
=== modified file 'tests/mocks/liblightdm/MockUsersModel.cpp'
--- tests/mocks/liblightdm/MockUsersModel.cpp 2017-01-19 20:12:34 +0000
+++ tests/mocks/liblightdm/MockUsersModel.cpp 2017-04-05 14:04:26 +0000
@@ -186,6 +186,7 @@
186 { "no-background", "No Background", "", 0, false, false, "ubuntu", 0 },186 { "no-background", "No Background", "", 0, false, false, "ubuntu", 0 },
187 { "no-password", "No Password", 0, 0, false, false, "ubuntu", 0 },187 { "no-password", "No Password", 0, 0, false, false, "ubuntu", 0 },
188 { "no-response", "No Response", 0, 0, false, false, "ubuntu", 0 },188 { "no-response", "No Response", 0, 0, false, false, "ubuntu", 0 },
189 { "no-session", "No Session", 0, 0, false, false, "", 0 },
189 { "question-prompt", "Question Prompt", 0, 0, false, false, "ubuntu", 0 },190 { "question-prompt", "Question Prompt", 0, 0, false, false, "ubuntu", 0 },
190 { "two-factor", "Two Factor", 0, 0, false, false, "ubuntu", 0 },191 { "two-factor", "Two Factor", 0, 0, false, false, "ubuntu", 0 },
191 { "two-prompts", "Two Prompts", 0, 0, false, false, "ubuntu", 0 },192 { "two-prompts", "Two Prompts", 0, 0, false, false, "ubuntu", 0 },
192193
=== modified file 'tests/plugins/LightDM/IntegratedLightDM/usersmodel.cpp'
--- tests/plugins/LightDM/IntegratedLightDM/usersmodel.cpp 2017-01-19 15:25:53 +0000
+++ tests/plugins/LightDM/IntegratedLightDM/usersmodel.cpp 2017-04-05 14:04:26 +0000
@@ -113,6 +113,19 @@
113 QCOMPARE(session, Greeter::instance()->defaultSessionHint());113 QCOMPARE(session, Greeter::instance()->defaultSessionHint());
114 }114 }
115115
116
117 void testEmptySession()
118 {
119 int i = findName(model, QStringLiteral("no-session"));
120 QVERIFY(i >= 0);
121
122 // A valid test as 'no-session' is instantiated with it's
123 // SessionRole as an empty string. This ensures something,
124 // hopefully sensical, is returned.
125 auto session = model->data(i, QLightDM::UsersModel::SessionRole);
126 QCOMPARE(session.toString().isEmpty(), false);
127 }
128
116 void testHideUsers()129 void testHideUsers()
117 {130 {
118 QLightDM::MockController::instance()->setHideUsersHint(true);131 QLightDM::MockController::instance()->setHideUsersHint(true);
119132
=== modified file 'tests/qmltests/Greeter/tst_WideView.qml'
--- tests/qmltests/Greeter/tst_WideView.qml 2017-02-28 16:49:40 +0000
+++ tests/qmltests/Greeter/tst_WideView.qml 2017-04-05 14:04:26 +0000
@@ -395,6 +395,20 @@
395 waitForRendering(view);395 waitForRendering(view);
396 }396 }
397397
398 function test_sessionless_user_is_still_valid() {
399 var loginList = findChild(view, "loginList")
400
401 /*
402 * If a user has never logged in before, or, for some reason
403 * has no sessionHint, ensure that the model returns the default
404 * session and that the view respects this
405 */
406 selectUser("no-session");
407 compare(LightDM.Users.data(loginList.currentIndex, LightDM.UserRoles.SessionRole), LightDM.Greeter.defaultSession);
408
409 tryCompare(loginList, "currentSession", LightDM.Greeter.defaultSession);
410 }
411
398 function test_changingSessionSticksToUser() {412 function test_changingSessionSticksToUser() {
399 var loginList = findChild(view, "loginList");413 var loginList = findChild(view, "loginList");
400414
@@ -426,7 +440,8 @@
426 var sessionChooserButton = findChild(view, "sessionChooserButton");440 var sessionChooserButton = findChild(view, "sessionChooserButton");
427 compare(sessionChooserButton.visible, true);441 compare(sessionChooserButton.visible, true);
428442
429 var session = String(view.sessionToStart).toLowerCase();443 var loginList = findChild(view, "loginList");
444 var session = String(loginList.currentSession).toLowerCase();
430 var icon = String(sessionChooserButton.icon);445 var icon = String(sessionChooserButton.icon);
431 compare(icon.indexOf(session) > -1, true);446 compare(icon.indexOf(session) > -1, true);
432447
433448
=== modified file 'tests/qmltests/Launcher/tst_Drawer.qml'
--- tests/qmltests/Launcher/tst_Drawer.qml 2017-03-13 14:52:26 +0000
+++ tests/qmltests/Launcher/tst_Drawer.qml 2017-04-05 14:04:26 +0000
@@ -271,8 +271,22 @@
271271
272 var searchField = findChild(drawer, "searchField");272 var searchField = findChild(drawer, "searchField");
273 tryCompareFunction(function() { return !!searchField }, true);273 tryCompareFunction(function() { return !!searchField }, true);
274 tryCompare(searchField, "selectedText", searchField.displayText);
274 typeString("cam");275 typeString("cam");
275 tryCompareFunction(function() { return searchField.displayText }, "cam");276 tryCompareFunction(function() { return searchField.displayText }, "cam");
277
278 // Try again to make sure it cleaned and everything
279 keyClick(Qt.Key_Escape);
280 waitForRendering(launcher);
281 waitUntilTransitionsEnd(launcher);
282 launcher.openDrawer(true);
283 waitForRendering(launcher);
284 waitUntilTransitionsEnd(launcher);
285
286 tryCompare(searchField, "selectedText", searchField.displayText);
287 typeString("terminal");
288 tryCompareFunction(function() { return searchField.displayText }, "terminal");
289
276 }290 }
277291
278 function test_kbdNavigation() {292 function test_kbdNavigation() {
279293
=== modified file 'tests/qmltests/Launcher/tst_Launcher.qml'
--- tests/qmltests/Launcher/tst_Launcher.qml 2017-03-24 08:27:54 +0000
+++ tests/qmltests/Launcher/tst_Launcher.qml 2017-04-05 14:04:26 +0000
@@ -1543,6 +1543,18 @@
1543 launcher.panelWidth = oldSize;1543 launcher.panelWidth = oldSize;
1544 }1544 }
15451545
1546 function test_doesntHideOnSuperWhenLockedVisible() {
1547 launcher.lockedVisible = true;
1548
1549 waitForRendering(launcher);
1550 launcher.superPressed = true;
1551 wait(400); // Longpress
1552 launcher.superPressed = false;
1553 waitForRendering(launcher);
1554
1555 verify(launcher.state, "visible");
1556 }
1557
1546 function test_mouseHoverSelectQuickList() {1558 function test_mouseHoverSelectQuickList() {
1547 dragLauncherIntoView();1559 dragLauncherIntoView();
1548 var clickedItem = findChild(launcher, "launcherDelegate5")1560 var clickedItem = findChild(launcher, "launcherDelegate5")
15491561
=== modified file 'tests/qmltests/Panel/tst_Panel.qml'
--- tests/qmltests/Panel/tst_Panel.qml 2017-03-17 13:44:30 +0000
+++ tests/qmltests/Panel/tst_Panel.qml 2017-04-05 14:04:26 +0000
@@ -779,40 +779,18 @@
779779
780 var appTitle = findChild(panel, "panelTitle"); verify(appTitle);780 var appTitle = findChild(panel, "panelTitle"); verify(appTitle);
781 var appMenuRow = findChild(panel.applicationMenus, "panelRow"); verify(appMenuRow);781 var appMenuRow = findChild(panel.applicationMenus, "panelRow"); verify(appMenuRow);
782 var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar);782 var menuBarLoader = findChild(panel, "menuBarLoader"); verify(menuBarLoader);
783783
784 tryCompare(appTitle, "visible", true, undefined, "App title should be visible");784 tryCompare(appTitle, "visible", true, undefined, "App title should be visible");
785 tryCompare(appMenuBar, "visible", false, undefined, "App menu bar should not be visible");785 tryCompare(menuBarLoader, "visible", false, undefined, "App menu bar should not be visible");
786786
787 mouseMove(panel, panel.width/2, panel.panelHeight);787 mouseMove(panel, panel.width/2, panel.panelHeight);
788788
789 var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar);
789 tryCompare(appTitle, "visible", false, undefined, "App title should not be visible on mouse hover");790 tryCompare(appTitle, "visible", false, undefined, "App title should not be visible on mouse hover");
790 tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover");791 tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover");
791 }792 }
792793
793 function test_windowedApplicationMenuShowOnMouseHoverWhenDecorationsShown() {
794 PanelState.title = "Fake Title";
795 panel.mode = "windowed";
796 mouseEmulation.checked = false;
797
798 var appTitle = findChild(panel, "panelTitle"); verify(appTitle);
799 var appMenuRow = findChild(panel.applicationMenus, "panelRow"); verify(appMenuRow);
800 var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar);
801
802 tryCompare(appTitle, "visible", true, undefined, "App title should be visible");
803 tryCompare(appMenuBar, "visible", false, undefined, "App menu bar should not be visible");
804
805 mouseMove(panel, panel.width/2, panel.panelHeight);
806
807 tryCompare(appTitle, "visible", true, undefined, "App title should still be visible on mouse hover when panel decorations are not visible");
808 tryCompare(appMenuBar, "visible", false, undefined, "App menu bar should be visible on mouse hover when panel decorations are not visible");
809
810 PanelState.decorationsVisible = true;
811
812 tryCompare(appTitle, "visible", false, undefined, "App title should still be visible on mouse hover when panel decorations are visible");
813 tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover when panel decorations not visible");
814 }
815
816 function test_keyboardNavigation_data() {794 function test_keyboardNavigation_data() {
817 return [795 return [
818 {tag: "tab to start", doTab: false},796 {tag: "tab to start", doTab: false},
819797
=== modified file 'tests/qmltests/Stage/tst_DesktopStage.qml'
--- tests/qmltests/Stage/tst_DesktopStage.qml 2017-03-24 14:04:50 +0000
+++ tests/qmltests/Stage/tst_DesktopStage.qml 2017-04-05 14:04:26 +0000
@@ -693,13 +693,6 @@
693 tryCompare(facebookAppDelegate, "maximized", true);693 tryCompare(facebookAppDelegate, "maximized", true);
694 }694 }
695695
696 function test_dashHasNoCloseButton() {
697 var dashAppDelegate = startApplication("unity8-dash");
698 verify(dashAppDelegate);
699 var closeButton = findChild(dashAppDelegate, "closeWindowButton");
700 tryCompare(closeButton, "visible", false);
701 }
702
703 function test_hideMaximizeButtonWhenSizeConstrained() {696 function test_hideMaximizeButtonWhenSizeConstrained() {
704 var dialerDelegate = startApplication("dialer-app");697 var dialerDelegate = startApplication("dialer-app");
705698
@@ -870,11 +863,7 @@
870 maximizeAppDelegate(appDelegate);863 maximizeAppDelegate(appDelegate);
871864
872 // Close the window and restart the application865 // Close the window and restart the application
873 var closeButton = findChild(appDelegate, "closeWindowButton");866 appDelegate.close();
874 appDelegate = null;
875 verify(closeButton);
876 mouseClick(closeButton);
877 closeButton = null;
878 tryCompare(topSurfaceList, "count", originalWindowCount);867 tryCompare(topSurfaceList, "count", originalWindowCount);
879 wait(100); // plus some spare room868 wait(100); // plus some spare room
880 appDelegate = startApplication("dialer-app");869 appDelegate = startApplication("dialer-app");
881870
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2017-03-24 11:08:11 +0000
+++ tests/qmltests/tst_Shell.qml 2017-04-05 14:04:26 +0000
@@ -138,9 +138,6 @@
138 }138 }
139 mode: shellLoader.mode139 mode: shellLoader.mode
140 hasTouchscreen: true140 hasTouchscreen: true
141 Component.onCompleted: {
142 ApplicationManager.startApplication("unity8-dash");
143 }
144 Component.onDestruction: {141 Component.onDestruction: {
145 shellLoader.itemDestroyed = true;142 shellLoader.itemDestroyed = true;
146 }143 }
@@ -601,10 +598,6 @@
601 topLevelSurfaceList = findInvisibleChild(shell, "topLevelSurfaceList");598 topLevelSurfaceList = findInvisibleChild(shell, "topLevelSurfaceList");
602 verify(topLevelSurfaceList);599 verify(topLevelSurfaceList);
603 stage = findChild(shell, "stage");600 stage = findChild(shell, "stage");
604
605 // wait until unity8-dash is fully loaded
606 tryCompare(topLevelSurfaceList, "count", 1);
607 waitUntilAppWindowIsFullyLoaded(topLevelSurfaceList.idAt(0));
608 }601 }
609602
610 function loadDesktopShellWithApps() {603 function loadDesktopShellWithApps() {
@@ -612,6 +605,7 @@
612 waitForRendering(shell)605 waitForRendering(shell)
613 shell.usageScenario = "desktop"606 shell.usageScenario = "desktop"
614 waitForRendering(shell)607 waitForRendering(shell)
608 var app0 = ApplicationManager.startApplication("unity8-dash")
615 var app1 = ApplicationManager.startApplication("dialer-app")609 var app1 = ApplicationManager.startApplication("dialer-app")
616 var app2 = ApplicationManager.startApplication("webbrowser-app")610 var app2 = ApplicationManager.startApplication("webbrowser-app")
617 var app3 = ApplicationManager.startApplication("camera-app")611 var app3 = ApplicationManager.startApplication("camera-app")
@@ -794,8 +788,37 @@
794 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);788 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
795 }789 }
796790
791 function test_greeterStartsCorrectSession() {
792 loadShell("desktop");
793 setLightDMMockMode("full");
794
795 LightDMController.sessionMode = "full"
796 LightDMController.numSessions = LightDMController.numAvailableSessions;
797 var greeter = findChild(shell, "greeter");
798 var view = findChild(greeter, "WideView");
799 verify(view, "This test requires WideView to be loaded");
800
801 var loginList = findChild(view, "loginList");
802
803 compare(view.sessionToStart, greeter.sessionToStart());
804
805 // Ensure another session can actually be selected
806 compare(LightDMController.numSessions > 1, true);
807 loginList.currentSession = LightDM.Sessions.data(1, LightDM.SessionRoles.KeyRole);
808
809 compare(view.sessionToStart, greeter.sessionToStart());
810
811 }
812
813
797 function swipeAwayGreeter() {814 function swipeAwayGreeter() {
798 var greeter = findChild(shell, "greeter");815 var greeter = findChild(shell, "greeter");
816
817 if (!greeter.shown) {
818 console.log("Greeter not shown. Not swiping.");
819 return;
820 }
821
799 tryCompare(greeter, "fullyShown", true);822 tryCompare(greeter, "fullyShown", true);
800 waitForGreeterToStabilize();823 waitForGreeterToStabilize();
801 removeTimeConstraintsFromSwipeAreas(greeter);824 removeTimeConstraintsFromSwipeAreas(greeter);
@@ -1222,26 +1245,11 @@
12221245
1223 var wizard = findChild(shell, "wizard");1246 var wizard = findChild(shell, "wizard");
1224 tryCompare(wizard, "active", true);1247 tryCompare(wizard, "active", true);
1225 tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "unity8-dash");
1226
1227 // Make sure we stay running when there's no top level window (can happen for
1228 // a moment when we restart the dash after switching language)
1229 var dashApplication = ApplicationManager.findApplication("unity8-dash");
1230 ApplicationManager.stopApplication(dashApplication.appId);
1231 // wait until all zombie surfaces are gone. As MirSurfaceItems hold references over them.
1232 // They won't be gone until those surface items are destroyed.
1233 tryCompareFunction(function() { return dashApplication.surfaceList.count }, 0);
12341248
1235 tryCompare(topLevelSurfaceList, "count", 0);1249 tryCompare(topLevelSurfaceList, "count", 0);
1236 compare(wizard.shown, true);1250 compare(wizard.shown, true);
12371251
1238 // And make sure we stay running when dash comes back again1252 // And make sure we stop when some surface shows app
1239 var dashSurfaceId = topLevelSurfaceList.nextId;
1240 ApplicationManager.startApplication(dashApplication.appId);
1241 waitUntilAppWindowIsFullyLoaded(dashSurfaceId);
1242 compare(wizard.shown, true);
1243
1244 // And make sure we stop when some other surface shows app
1245 var gallerySurfaceId = topLevelSurfaceList.nextId;1253 var gallerySurfaceId = topLevelSurfaceList.nextId;
1246 var galleryApp = ApplicationManager.startApplication("gallery-app");1254 var galleryApp = ApplicationManager.startApplication("gallery-app");
1247 waitUntilAppWindowIsFullyLoaded(gallerySurfaceId);1255 waitUntilAppWindowIsFullyLoaded(gallerySurfaceId);
@@ -1291,6 +1299,11 @@
1291 function test_tapOnRightEdgeReachesApplicationSurface() {1299 function test_tapOnRightEdgeReachesApplicationSurface() {
1292 loadShell("phone");1300 loadShell("phone");
1293 swipeAwayGreeter();1301 swipeAwayGreeter();
1302
1303 var appSurfaceId = topLevelSurfaceList.nextId;
1304 var app = ApplicationManager.startApplication("unity8-dash")
1305 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1306
1294 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));1307 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
1295 verify(topmostSpreadDelegate);1308 verify(topmostSpreadDelegate);
12961309
@@ -1320,6 +1333,11 @@
1320 function test_rightEdgeDragDoesNotReachApplicationSurface() {1333 function test_rightEdgeDragDoesNotReachApplicationSurface() {
1321 loadShell("phone");1334 loadShell("phone");
1322 swipeAwayGreeter();1335 swipeAwayGreeter();
1336
1337 var appSurfaceId = topLevelSurfaceList.nextId;
1338 var app = ApplicationManager.startApplication("unity8-dash")
1339 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1340
1323 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));1341 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
1324 var topmostSurfaceItem = findChild(topmostSpreadDelegate, "surfaceItem");1342 var topmostSurfaceItem = findChild(topmostSpreadDelegate, "surfaceItem");
1325 var rightEdgeDragArea = findChild(shell, "rightEdgeDragArea");1343 var rightEdgeDragArea = findChild(shell, "rightEdgeDragArea");
@@ -1372,15 +1390,15 @@
1372 verify(coverPage.shown);1390 verify(coverPage.shown);
1373 }1391 }
13741392
1375 function test_physicalHomeKeyPressFocusesDash() {1393 function test_physicalHomeKeyPressOpensDrawer() {
1376 loadShell("phone");1394 loadShell("phone");
13771395 swipeAwayGreeter();
1378 var galleryApp = ApplicationManager.startApplication("gallery-app");
1379 tryCompare(ApplicationManager, "focusedApplicationId", "gallery-app");
13801396
1381 var windowInputMonitor = findInvisibleChild(shell, "windowInputMonitor");1397 var windowInputMonitor = findInvisibleChild(shell, "windowInputMonitor");
1382 windowInputMonitor.homeKeyActivated();1398 windowInputMonitor.homeKeyActivated();
1383 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");1399
1400 var launcher = findChild(shell, "launcher");
1401 tryCompare(launcher, "drawerShown", true);
1384 }1402 }
13851403
1386 function test_tabletLogin_data() {1404 function test_tabletLogin_data() {
@@ -1499,6 +1517,10 @@
1499 loadShell("tablet");1517 loadShell("tablet");
1500 shell.usageScenario = "desktop";1518 shell.usageScenario = "desktop";
15011519
1520 var appSurfaceId = topLevelSurfaceList.nextId;
1521 var app = ApplicationManager.startApplication("unity8-dash")
1522 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1523
1502 var webBrowserSurfaceId = topLevelSurfaceList.nextId;1524 var webBrowserSurfaceId = topLevelSurfaceList.nextId;
1503 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");1525 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");
1504 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);1526 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);
@@ -1523,6 +1545,10 @@
1523 loadShell("tablet");1545 loadShell("tablet");
1524 shell.usageScenario = "tablet";1546 shell.usageScenario = "tablet";
15251547
1548 var appSurfaceId = topLevelSurfaceList.nextId;
1549 var app = ApplicationManager.startApplication("unity8-dash")
1550 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1551
1526 var webBrowserSurfaceId = topLevelSurfaceList.nextId;1552 var webBrowserSurfaceId = topLevelSurfaceList.nextId;
1527 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");1553 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");
1528 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);1554 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);
@@ -2415,7 +2441,7 @@
24152441
2416 tryCompare(broadcastUrlSpy, "count", 1);2442 tryCompare(broadcastUrlSpy, "count", 1);
2417 compare(broadcastUrlSpy.signalArguments[0][0], "application:///" + appIcon.appId + ".desktop");2443 compare(broadcastUrlSpy.signalArguments[0][0], "application:///" + appIcon.appId + ".desktop");
2418 compare(ApplicationManager.count, 1); // confirm only dash is open, we didn't start new app2444 compare(ApplicationManager.count, 0); // confirm no app is open, we didn't start new app
24192445
2420 var coverPage = findChild(shell, "coverPage");2446 var coverPage = findChild(shell, "coverPage");
2421 tryCompare(coverPage, "showProgress", 0);2447 tryCompare(coverPage, "showProgress", 0);
@@ -2456,7 +2482,7 @@
24562482
2457 tryCompare(broadcastUrlSpy, "count", 1);2483 tryCompare(broadcastUrlSpy, "count", 1);
2458 compare(broadcastUrlSpy.signalArguments[0][0], "test:");2484 compare(broadcastUrlSpy.signalArguments[0][0], "test:");
2459 compare(ApplicationManager.count, 1); // confirm only dash is open, we didn't start new app2485 compare(ApplicationManager.count, 0); // confirm no app is open, we didn't start new app
24602486
2461 var coverPage = findChild(shell, "coverPage");2487 var coverPage = findChild(shell, "coverPage");
2462 tryCompare(coverPage, "showProgress", 0);2488 tryCompare(coverPage, "showProgress", 0);
@@ -2685,6 +2711,10 @@
2685 ensureInputMethodSurface();2711 ensureInputMethodSurface();
2686 shell.oskEnabled = data.oskEnabled;2712 shell.oskEnabled = data.oskEnabled;
26872713
2714 var appSurfaceId = topLevelSurfaceList.nextId;
2715 var app = ApplicationManager.startApplication("unity8-dash")
2716 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
2717
2688 var oldOSKState = topLevelSurfaceList.inputMethodSurface.state;2718 var oldOSKState = topLevelSurfaceList.inputMethodSurface.state;
2689 topLevelSurfaceList.inputMethodSurface.requestState(Mir.RestoredState);2719 topLevelSurfaceList.inputMethodSurface.requestState(Mir.RestoredState);
2690 var appRepeater = findChild(shell, "appRepeater");2720 var appRepeater = findChild(shell, "appRepeater");
@@ -2957,7 +2987,11 @@
2957 swipeAwayGreeter();2987 swipeAwayGreeter();
29582988
2959 var appSurfaceId = topLevelSurfaceList.nextId;2989 var appSurfaceId = topLevelSurfaceList.nextId;
2960 var app = ApplicationManager.startApplication("dialer-app")2990 var app = ApplicationManager.startApplication("unity8-dash")
2991 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
2992
2993 appSurfaceId = topLevelSurfaceList.nextId;
2994 app = ApplicationManager.startApplication("dialer-app")
2961 waitUntilAppWindowIsFullyLoaded(appSurfaceId);2995 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
29622996
2963 appSurfaceId = topLevelSurfaceList.nextId;2997 appSurfaceId = topLevelSurfaceList.nextId;
@@ -2984,12 +3018,6 @@
2984 // Now the dash should be highlighted3018 // Now the dash should be highlighted
2985 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "unity8-dash"}, true);3019 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "unity8-dash"}, true);
29863020
2987 keyClick(Qt.Key_Q);
2988
2989 // Dash is not closeable, should still be 2
2990 tryCompare(ApplicationManager, "count", 2);
2991
2992 // Move to the next one, should be closable again
2993 keyClick(Qt.Key_Tab);3021 keyClick(Qt.Key_Tab);
2994 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "calendar-app"}, true);3022 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "calendar-app"}, true);
29953023
@@ -3170,6 +3198,96 @@
3170 tryCompare(menuBarLoader.item, "visible", true);3198 tryCompare(menuBarLoader.item, "visible", true);
3171 }3199 }
31723200
3201 function test_enforceFocusOnStageOnAltTab() {
3202 loadShell("desktop");
3203 shell.usageScenario = "desktop";
3204 waitForRendering(shell);
3205 swipeAwayGreeter();
3206
3207 var appSurfaceId = topLevelSurfaceList.nextId;
3208 var app = ApplicationManager.startApplication("unity8-dash")
3209 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
3210
3211 var appDelegate = startApplication("music-app")
3212 verify(appDelegate);
3213 waitForRendering(shell);
3214
3215 var launcher = findChild(shell, "launcher");
3216 launcher.focus = true;
3217
3218 var stage = findChild(shell, "stage");
3219
3220 var spreadItem = findChild(shell, "spreadItem");
3221
3222 compare(spreadItem.highlightedIndex, -1);
3223
3224 keyPress(Qt.Key_Alt);
3225 keyClick(Qt.Key_Tab);
3226
3227 tryCompare(spreadItem, "highlightedIndex", 1);
3228 tryCompare(stage, "focus", true);
3229
3230 keyClick(Qt.Key_Tab);
3231
3232 tryCompare(spreadItem, "highlightedIndex", 0);
3233
3234 keyRelease(Qt.Key_Alt);
3235 }
3236
3237 function test_maximizedWindowMenuThenAltTab_data() {
3238 return [
3239 { tag: "show spread", showSpread: true },
3240 { tag: "do not show spread", showSpread: false },
3241 ];
3242 }
3243
3244 function test_maximizedWindowMenuThenAltTab(data) {
3245 loadShell("desktop");
3246 shell.usageScenario = "desktop";
3247 waitForRendering(shell);
3248 swipeAwayGreeter();
3249
3250 var appDelegate = startApplication("gmail-webapp");
3251 var appDelegate2 = startApplication("dialer-app");
3252
3253 tryCompare(appDelegate2.surface, "activeFocus", true);
3254
3255 var maximizeButton = findChild(appDelegate2, "maximizeWindowButton");
3256 mouseClick(maximizeButton);
3257 tryCompare(appDelegate2, "state", "maximized");
3258
3259 var panel = findChild(shell, "panel");
3260 var panelMouse = findChild(panel, "windowControlArea");
3261 mouseMove(panelMouse);
3262 var panelMenu = findChild(panel, "menuBar");
3263 var menuBarLoader = findChild(panel, "menuBarLoader");
3264 mouseMove(panelMenu);
3265 var panelMenuItem = findChild(panelMenu, "menuBar-item0");
3266 tryCompare(panelMenuItem, "visible", true);
3267 Util.waitForBehaviors(shell);
3268 mouseClick(panelMenuItem);
3269 var panelMenuItemItem = findChild(panelMenu, "menuBar-item0-menu-item0-actionItem");
3270 mouseMove(panelMenuItemItem, panelMenuItemItem.width/2, panelMenuItemItem.height/2);
3271 verify(panelMenuItemItem.activeFocus);
3272 verify(panelMenuItem.__popup);
3273
3274 keyPress(Qt.Key_Alt);
3275 keyClick(Qt.Key_Tab);
3276 if (data.showSpread) {
3277 tryCompare(stage, "spreadShown", true);
3278 }
3279 tryCompareFunction(function() { return menuBarLoader.active === false; }, true);
3280 keyRelease(Qt.Key_Alt)
3281
3282 tryCompare(appDelegate.surface, "activeFocus", true);
3283
3284 keyPress(Qt.Key_Alt);
3285 keyClick(Qt.Key_Tab);
3286 keyRelease(Qt.Key_Alt)
3287
3288 tryCompare(appDelegate2.surface, "activeFocus", true);
3289 }
3290
3173 function test_maximizedWindowAndMenuInPanel() {3291 function test_maximizedWindowAndMenuInPanel() {
3174 loadShell("desktop");3292 loadShell("desktop");
3175 shell.usageScenario = "desktop";3293 shell.usageScenario = "desktop";

Subscribers

People subscribed via source and target branches