on xenial help sign in
fix hiding the stage when the app is killed
commit3a4ef73961aba5f9b4ad181f68601da8ac133e17 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 20 Jan 2014, 19:08 (13 years ago) parent3570b4a
2 files changed+23−1
qml/Shell.qml+4−1 tests/qmltests/tst_Shell.qml+19
qml/Shell.qml+4−1
@@ -121,11 +121,12 @@ FocusScope {
121121 property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
122122
123123 readonly property bool applicationRunning: ApplicationManager.focusedApplicationId.length > 0
124+ onApplicationRunningChanged: print("***************+ application running", applicationRunning)
124125
125126 // Whether the user should see the topmost application surface (if there's one at all).
126127 readonly property bool applicationSurfaceShouldBeSeen: applicationRunning && !stages.painting
127128
128− // NB! Application surfaces are stacked behing the shell one. So they can only be seen by the user
129+ // NB! Application surfaces are stacked behind the shell one. So they can only be seen by the user
129130 // through the translucent parts of the shell surface.
130131 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
131132
@@ -227,6 +228,8 @@ FocusScope {
227228 if (ApplicationManager.focusedApplicationId.length > 0) {
228229 print("should show stages")
229230 stages.show();
231+ } else {
232+ stages.hide();
230233 }
231234 }
232235
tests/qmltests/tst_Shell.qml+19
@@ -117,6 +117,7 @@ Item {
117117 while (apps.count > 0) {
118118 ApplicationManager.stopApplication(apps.get(0).appId);
119119 }
120+ compare(ApplicationManager.count, 0)
120121 }
121122
122123 /*
@@ -182,28 +183,34 @@ Item {
182183 function test_suspend() {
183184 var greeter = findChild(shell, "greeter");
184185
186+ print("step1")
185187 // Launch an app from the launcher
186188 dragLauncherIntoView();
187189 tapOnAppIconInLauncher();
188190 waitUntilApplicationWindowIsFullyVisible();
189191
192+ print("step2")
190193 var mainApp = ApplicationManager.focusedApplicationId;
191194 verify(mainApp != "");
192195
196+ print("step3")
193197 // Try to suspend while proximity is engaged...
194198 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
195199 tryCompare(greeter, "showProgress", 0);
196200
201+ print("step4")
197202 // Now really suspend
198203 Powerd.displayPowerStateChange(Powerd.Off, 0);
199204 tryCompare(greeter, "showProgress", 1);
200205 tryCompare(ApplicationManager, "focusedApplicationId", "");
201206
207+ print("step5")
202208 // And wake up
203209 Powerd.displayPowerStateChange(Powerd.On, 0);
204210 tryCompare(ApplicationManager, "focusedApplicationId", "");
205211 tryCompare(greeter, "showProgress", 1);
206212
213+ print("step6")
207214 // Swipe away greeter to focus app
208215 swipeAwayGreeter();
209216 tryCompare(ApplicationManager, "focusedApplicationId", mainApp);
@@ -503,6 +510,8 @@ Item {
503510
504511 function test_DashShown(data) {
505512
513+ print("step1")
514+ // greeter: false,
506515 if (data.greeter) {
507516 // Swipe the greeter in
508517 var greeter = findChild(shell, "greeter");
@@ -510,21 +519,31 @@ Item {
510519 tryCompare(greeter, "showProgress", 1);
511520 }
512521
522+ print("step2")
523+ //app: false,
513524 if (data.app) {
514525 dragLauncherIntoView();
515526 tapOnAppIconInLauncher();
516527 }
517528
529+ print("step3")
530+ // launcher: true,
518531 if (data.launcher) {
519532 dragLauncherIntoView();
520533 }
521534
535+ print("step4")
536+ // indicators: false,
522537 if (data.indicators) {
523538 showIndicators();
524539 }
525540
541+ print("step5")
542+ //expectedShown: true},
526543 var dash = findChild(shell, "dash");
544+ print("step6", dash, dash.shown, data.expectedShown)
527545 tryCompare(dash, "shown", data.expectedShown);
546+ print("step7")
528547 }
529548
530549 function test_searchIndicatorHidesOnAppFocus() {