on xenial help sign in
don't autostart the dash app, but show its .desktop file instead
4048692Michael Zanetti
data/unity8-dash.confdeleted−25
@@ -1,25 +0,0 @@
1−description "Unity Shell v8 Dash"
2−author "Michael Zanetti <michael.zanetti@canonical.com>"
3−
4−emits scope-ui-starting
5−
6−start on started unity8
7−stop on stopping unity8
8−
9−kill 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−
14−oom score 50
15−
16−respawn
17−respawn limit unlimited
18−
19−env APP_ID=unity8-dash
20−
21−pre-start script
22− initctl emit scope-ui-starting
23−end script
24−
25−exec ${BINARY:-unity8-dash} $ARGS --desktop_file_hint=unity8-dash.desktop
data/unity8-dash.desktop.in−1
@@ -5,5 +5,4 @@ Comment=An interface for using the Scopes system
5Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-dash
5Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-dash
6Terminal=false
6Terminal=false
7Icon=@CMAKE_INSTALL_PREFIX@/@SHELL_APP_DIR@/Dash/unity8-dash.png
7Icon=@CMAKE_INSTALL_PREFIX@/@SHELL_APP_DIR@/Dash/unity8-dash.png
8−NoDisplay=true
9X-Ubuntu-Touch=true
8X-Ubuntu-Touch=true
debian/unity8.install−1
@@ -1,6 +1,5 @@
1debian/usr.bin.unity8-dash etc/apparmor.d
1debian/usr.bin.unity8-dash etc/apparmor.d
2var/lib/unity8/version
2var/lib/unity8/version
3−data/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/
qml/Greeter/Greeter.qml+1−1
@@ -102,7 +102,7 @@ Showable {
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 user
105+ } else {
106 d.startUnlock(false /* toTheRight */);
106 d.startUnlock(false /* toTheRight */);
107 }
107 }
108 }
108 }
qml/Shell.qml+2−3
@@ -110,7 +110,7 @@ StyledItem {
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 the
114 // If this happens on first boot, we may be in the
115 // wizard while receiving a call. But a call is more
115 // 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 @@ StyledItem {
241 onHomeKeyActivated: {
241 onHomeKeyActivated: {
242 // Ignore when greeter is active, to avoid pocket presses
242 // 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; }
qml/Stage/DecoratedWindow.qml+1−1
@@ -211,7 +211,7 @@ FocusScope {
211
211
212 WindowDecoration {
212 WindowDecoration {
213 id: decoration
213 id: decoration
214− closeButtonVisible: root.application.appId !== "unity8-dash"
214+ closeButtonVisible: true
215 objectName: "appWindowDecoration"
215 objectName: "appWindowDecoration"
216
216
217 anchors { left: parent.left; top: parent.top; right: parent.right }
217 anchors { left: parent.left; top: parent.top; right: parent.right }
qml/Stage/Stage.qml+5−7
@@ -172,7 +172,7 @@ FocusScope {
172 id: closeFocusedShortcut
172 id: closeFocusedShortcut
173 shortcut: Qt.AltModifier|Qt.Key_F4
173 shortcut: Qt.AltModifier|Qt.Key_F4
174 onTriggered: {
174 onTriggered: {
175− if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
175+ if (priv.focusedAppDelegate) {
176 priv.focusedAppDelegate.close();
176 priv.focusedAppDelegate.close();
177 }
177 }
178 }
178 }
@@ -432,7 +432,7 @@ FocusScope {
432 Binding {
432 Binding {
433 target: PanelState
433 target: PanelState
434 property: "closeButtonShown"
434 property: "closeButtonShown"
435− value: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized && !priv.focusedAppDelegate.isDash
435+ value: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized
436 }
436 }
437
437
438 Component.onDestruction: {
438 Component.onDestruction: {
@@ -614,9 +614,7 @@ FocusScope {
614 }
614 }
615
615
616 onCloseCurrentApp: {
616 onCloseCurrentApp: {
617− if (!appRepeater.itemAt(highlightedIndex).isDash) {
618− appRepeater.itemAt(highlightedIndex).close();
617+ appRepeater.itemAt(highlightedIndex).close();
619− }
620 }
618 }
621 }
619 }
622
620
@@ -1755,7 +1753,7 @@ FocusScope {
1755 objectName: "dragArea"
1753 objectName: "dragArea"
1756 anchors.fill: decoratedWindow
1754 anchors.fill: decoratedWindow
1757 enabled: false
1755 enabled: false
1758− closeable: !appDelegate.isDash
1756+ closeable: true
1759
1757
1760 onClicked: {
1758 onClicked: {
1761 spreadItem.highlightedIndex = index;
1759 spreadItem.highlightedIndex = index;
@@ -1798,7 +1796,7 @@ FocusScope {
1798 objectName: "closeMouseArea"
1796 objectName: "closeMouseArea"
1799 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 }
1800 readonly property var mousePos: hoverMouseArea.mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
1798 readonly property var mousePos: hoverMouseArea.mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
1801− visible: !appDelegate.isDash && dragArea.distance == 0
1799+ visible: dragArea.distance == 0
1802 && index == spreadItem.highlightedIndex
1800 && index == spreadItem.highlightedIndex
1803 && mousePos.y < (decoratedWindow.height / 3)
1801 && mousePos.y < (decoratedWindow.height / 3)
1804 && mousePos.y > -units.gu(4)
1802 && mousePos.y > -units.gu(4)
qml/Tutorial/TutorialContent.qml+1−2
@@ -153,8 +153,7 @@ Item {
153 paused: root.paused
153 paused: root.paused
154
154
155 skipped: tutorialLeftLongLoader.skipped
155 skipped: tutorialLeftLongLoader.skipped
156− isReady: tutorialTopLoader.skipped && !skipped && !paused && !delayed &&
156+ isReady: tutorialTopLoader.skipped && !skipped && !paused && !delayed
157− ApplicationManager.focusedApplicationId != "unity8-dash"
158
157
159 InactivityTimer {
158 InactivityTimer {
160 id: tutorialLeftLongTimer
159 id: tutorialLeftLongTimer
tests/qmltests/Stage/tst_DesktopStage.qml−7
@@ -693,13 +693,6 @@ Item {
693 tryCompare(facebookAppDelegate, "maximized", true);
693 tryCompare(facebookAppDelegate, "maximized", true);
694 }
694 }
695
695
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");
705
698
tests/qmltests/tst_Shell.qml+46−37
@@ -138,9 +138,6 @@ Rectangle {
138 }
138 }
139 mode: shellLoader.mode
139 mode: shellLoader.mode
140 hasTouchscreen: true
140 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 @@ Rectangle {
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 }
609
602
610 function loadDesktopShellWithApps() {
603 function loadDesktopShellWithApps() {
@@ -612,6 +605,7 @@ Rectangle {
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")
@@ -819,6 +813,12 @@ Rectangle {
819
813
820 function swipeAwayGreeter() {
814 function swipeAwayGreeter() {
821 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+
822 tryCompare(greeter, "fullyShown", true);
822 tryCompare(greeter, "fullyShown", true);
823 waitForGreeterToStabilize();
823 waitForGreeterToStabilize();
824 removeTimeConstraintsFromSwipeAreas(greeter);
824 removeTimeConstraintsFromSwipeAreas(greeter);
@@ -1245,26 +1245,11 @@ Rectangle {
1245
1245
1246 var wizard = findChild(shell, "wizard");
1246 var wizard = findChild(shell, "wizard");
1247 tryCompare(wizard, "active", true);
1247 tryCompare(wizard, "active", true);
1248− tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "unity8-dash");
1249−
1250− // Make sure we stay running when there's no top level window (can happen for
1251− // a moment when we restart the dash after switching language)
1252− var dashApplication = ApplicationManager.findApplication("unity8-dash");
1253− ApplicationManager.stopApplication(dashApplication.appId);
1254− // wait until all zombie surfaces are gone. As MirSurfaceItems hold references over them.
1255− // They won't be gone until those surface items are destroyed.
1256− tryCompareFunction(function() { return dashApplication.surfaceList.count }, 0);
1257
1248
1258 tryCompare(topLevelSurfaceList, "count", 0);
1249 tryCompare(topLevelSurfaceList, "count", 0);
1259 compare(wizard.shown, true);
1250 compare(wizard.shown, true);
1260
1251
1261− // And make sure we stay running when dash comes back again
1262− var dashSurfaceId = topLevelSurfaceList.nextId;
1263− ApplicationManager.startApplication(dashApplication.appId);
1264− waitUntilAppWindowIsFullyLoaded(dashSurfaceId);
1265− compare(wizard.shown, true);
1266−
1267− // And make sure we stop when some other surface shows app
1252+ // And make sure we stop when some surface shows app
1268 var gallerySurfaceId = topLevelSurfaceList.nextId;
1253 var gallerySurfaceId = topLevelSurfaceList.nextId;
1269 var galleryApp = ApplicationManager.startApplication("gallery-app");
1254 var galleryApp = ApplicationManager.startApplication("gallery-app");
1270 waitUntilAppWindowIsFullyLoaded(gallerySurfaceId);
1255 waitUntilAppWindowIsFullyLoaded(gallerySurfaceId);
@@ -1314,6 +1299,11 @@ Rectangle {
1314 function test_tapOnRightEdgeReachesApplicationSurface() {
1299 function test_tapOnRightEdgeReachesApplicationSurface() {
1315 loadShell("phone");
1300 loadShell("phone");
1316 swipeAwayGreeter();
1301 swipeAwayGreeter();
1302+
1303+ var appSurfaceId = topLevelSurfaceList.nextId;
1304+ var app = ApplicationManager.startApplication("unity8-dash")
1305+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1306+
1317 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
1307 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
1318 verify(topmostSpreadDelegate);
1308 verify(topmostSpreadDelegate);
1319
1309
@@ -1343,6 +1333,11 @@ Rectangle {
1343 function test_rightEdgeDragDoesNotReachApplicationSurface() {
1333 function test_rightEdgeDragDoesNotReachApplicationSurface() {
1344 loadShell("phone");
1334 loadShell("phone");
1345 swipeAwayGreeter();
1335 swipeAwayGreeter();
1336+
1337+ var appSurfaceId = topLevelSurfaceList.nextId;
1338+ var app = ApplicationManager.startApplication("unity8-dash")
1339+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1340+
1346 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
1341 var topmostSpreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
1347 var topmostSurfaceItem = findChild(topmostSpreadDelegate, "surfaceItem");
1342 var topmostSurfaceItem = findChild(topmostSpreadDelegate, "surfaceItem");
1348 var rightEdgeDragArea = findChild(shell, "rightEdgeDragArea");
1343 var rightEdgeDragArea = findChild(shell, "rightEdgeDragArea");
@@ -1395,15 +1390,15 @@ Rectangle {
1395 verify(coverPage.shown);
1390 verify(coverPage.shown);
1396 }
1391 }
1397
1392
1398− function test_physicalHomeKeyPressFocusesDash() {
1393+ function test_physicalHomeKeyPressOpensDrawer() {
1399 loadShell("phone");
1394 loadShell("phone");
1400−
1395+ swipeAwayGreeter();
1401− var galleryApp = ApplicationManager.startApplication("gallery-app");
1402− tryCompare(ApplicationManager, "focusedApplicationId", "gallery-app");
1403
1396
1404 var windowInputMonitor = findInvisibleChild(shell, "windowInputMonitor");
1397 var windowInputMonitor = findInvisibleChild(shell, "windowInputMonitor");
1405 windowInputMonitor.homeKeyActivated();
1398 windowInputMonitor.homeKeyActivated();
1406− tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
1399+
1400+ var launcher = findChild(shell, "launcher");
1401+ tryCompare(launcher, "drawerShown", true);
1407 }
1402 }
1408
1403
1409 function test_tabletLogin_data() {
1404 function test_tabletLogin_data() {
@@ -1522,6 +1517,10 @@ Rectangle {
1522 loadShell("tablet");
1517 loadShell("tablet");
1523 shell.usageScenario = "desktop";
1518 shell.usageScenario = "desktop";
1524
1519
1520+ var appSurfaceId = topLevelSurfaceList.nextId;
1521+ var app = ApplicationManager.startApplication("unity8-dash")
1522+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1523+
1525 var webBrowserSurfaceId = topLevelSurfaceList.nextId;
1524 var webBrowserSurfaceId = topLevelSurfaceList.nextId;
1526 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");
1525 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");
1527 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);
1526 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);
@@ -1546,6 +1545,10 @@ Rectangle {
1546 loadShell("tablet");
1545 loadShell("tablet");
1547 shell.usageScenario = "tablet";
1546 shell.usageScenario = "tablet";
1548
1547
1548+ var appSurfaceId = topLevelSurfaceList.nextId;
1549+ var app = ApplicationManager.startApplication("unity8-dash")
1550+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
1551+
1549 var webBrowserSurfaceId = topLevelSurfaceList.nextId;
1552 var webBrowserSurfaceId = topLevelSurfaceList.nextId;
1550 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");
1553 var webBrowserApp = ApplicationManager.startApplication("webbrowser-app");
1551 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);
1554 waitUntilAppWindowIsFullyLoaded(webBrowserSurfaceId);
@@ -2438,7 +2441,7 @@ Rectangle {
2438
2441
2439 tryCompare(broadcastUrlSpy, "count", 1);
2442 tryCompare(broadcastUrlSpy, "count", 1);
2440 compare(broadcastUrlSpy.signalArguments[0][0], "application:///" + appIcon.appId + ".desktop");
2443 compare(broadcastUrlSpy.signalArguments[0][0], "application:///" + appIcon.appId + ".desktop");
2441− compare(ApplicationManager.count, 1); // confirm only dash is open, we didn't start new app
2444+ compare(ApplicationManager.count, 0); // confirm no app is open, we didn't start new app
2442
2445
2443 var coverPage = findChild(shell, "coverPage");
2446 var coverPage = findChild(shell, "coverPage");
2444 tryCompare(coverPage, "showProgress", 0);
2447 tryCompare(coverPage, "showProgress", 0);
@@ -2479,7 +2482,7 @@ Rectangle {
2479
2482
2480 tryCompare(broadcastUrlSpy, "count", 1);
2483 tryCompare(broadcastUrlSpy, "count", 1);
2481 compare(broadcastUrlSpy.signalArguments[0][0], "test:");
2484 compare(broadcastUrlSpy.signalArguments[0][0], "test:");
2482− compare(ApplicationManager.count, 1); // confirm only dash is open, we didn't start new app
2485+ compare(ApplicationManager.count, 0); // confirm no app is open, we didn't start new app
2483
2486
2484 var coverPage = findChild(shell, "coverPage");
2487 var coverPage = findChild(shell, "coverPage");
2485 tryCompare(coverPage, "showProgress", 0);
2488 tryCompare(coverPage, "showProgress", 0);
@@ -2708,6 +2711,10 @@ Rectangle {
2708 ensureInputMethodSurface();
2711 ensureInputMethodSurface();
2709 shell.oskEnabled = data.oskEnabled;
2712 shell.oskEnabled = data.oskEnabled;
2710
2713
2714+ var appSurfaceId = topLevelSurfaceList.nextId;
2715+ var app = ApplicationManager.startApplication("unity8-dash")
2716+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
2717+
2711 var oldOSKState = topLevelSurfaceList.inputMethodSurface.state;
2718 var oldOSKState = topLevelSurfaceList.inputMethodSurface.state;
2712 topLevelSurfaceList.inputMethodSurface.requestState(Mir.RestoredState);
2719 topLevelSurfaceList.inputMethodSurface.requestState(Mir.RestoredState);
2713 var appRepeater = findChild(shell, "appRepeater");
2720 var appRepeater = findChild(shell, "appRepeater");
@@ -2980,7 +2987,11 @@ Rectangle {
2980 swipeAwayGreeter();
2987 swipeAwayGreeter();
2981
2988
2982 var appSurfaceId = topLevelSurfaceList.nextId;
2989 var appSurfaceId = topLevelSurfaceList.nextId;
2983− 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")
2984 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
2995 waitUntilAppWindowIsFullyLoaded(appSurfaceId);
2985
2996
2986 appSurfaceId = topLevelSurfaceList.nextId;
2997 appSurfaceId = topLevelSurfaceList.nextId;
@@ -3007,12 +3018,6 @@ Rectangle {
3007 // Now the dash should be highlighted
3018 // Now the dash should be highlighted
3008 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "unity8-dash"}, true);
3019 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "unity8-dash"}, true);
3009
3020
3010− keyClick(Qt.Key_Q);
3011−
3012− // Dash is not closeable, should still be 2
3013− tryCompare(ApplicationManager, "count", 2);
3014−
3015− // Move to the next one, should be closable again
3016 keyClick(Qt.Key_Tab);
3021 keyClick(Qt.Key_Tab);
3017 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "calendar-app"}, true);
3022 tryCompareFunction(function() {return appRepeater.itemAt(spread.highlightedIndex).appId == "calendar-app"}, true);
3018
3023
@@ -3199,6 +3204,10 @@ Rectangle {
3199 waitForRendering(shell);
3204 waitForRendering(shell);
3200 swipeAwayGreeter();
3205 swipeAwayGreeter();
3201
3206
3207+ var appSurfaceId = topLevelSurfaceList.nextId;
3208+ var app = ApplicationManager.startApplication("unity8-dash")
3209+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
3210+
3202 var appDelegate = startApplication("music-app")
3211 var appDelegate = startApplication("music-app")
3203 verify(appDelegate);
3212 verify(appDelegate);
3204 waitForRendering(shell);
3213 waitForRendering(shell);