on xenial help sign in
fix hiding the stage when the app is killed
3a4ef73Michael Zanetti
qml/Shell.qml+4−1
@@ -121,11 +121,12 @@ FocusScope {
121 property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
121 property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
122
122
123 readonly property bool applicationRunning: ApplicationManager.focusedApplicationId.length > 0
123 readonly property bool applicationRunning: ApplicationManager.focusedApplicationId.length > 0
124+ onApplicationRunningChanged: print("***************+ application running", applicationRunning)
124
125
125 // Whether the user should see the topmost application surface (if there's one at all).
126 // Whether the user should see the topmost application surface (if there's one at all).
126 readonly property bool applicationSurfaceShouldBeSeen: applicationRunning && !stages.painting
127 readonly property bool applicationSurfaceShouldBeSeen: applicationRunning && !stages.painting
127
128
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
129 // through the translucent parts of the shell surface.
130 // through the translucent parts of the shell surface.
130 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
131 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
131
132
@@ -227,6 +228,8 @@ FocusScope {
227 if (ApplicationManager.focusedApplicationId.length > 0) {
228 if (ApplicationManager.focusedApplicationId.length > 0) {
228 print("should show stages")
229 print("should show stages")
229 stages.show();
230 stages.show();
231+ } else {
232+ stages.hide();
230 }
233 }
231 }
234 }
232
235
tests/qmltests/tst_Shell.qml+19
@@ -117,6 +117,7 @@ Item {
117 while (apps.count > 0) {
117 while (apps.count > 0) {
118 ApplicationManager.stopApplication(apps.get(0).appId);
118 ApplicationManager.stopApplication(apps.get(0).appId);
119 }
119 }
120+ compare(ApplicationManager.count, 0)
120 }
121 }
121
122
122 /*
123 /*
@@ -182,28 +183,34 @@ Item {
182 function test_suspend() {
183 function test_suspend() {
183 var greeter = findChild(shell, "greeter");
184 var greeter = findChild(shell, "greeter");
184
185
186+ print("step1")
185 // Launch an app from the launcher
187 // Launch an app from the launcher
186 dragLauncherIntoView();
188 dragLauncherIntoView();
187 tapOnAppIconInLauncher();
189 tapOnAppIconInLauncher();
188 waitUntilApplicationWindowIsFullyVisible();
190 waitUntilApplicationWindowIsFullyVisible();
189
191
192+ print("step2")
190 var mainApp = ApplicationManager.focusedApplicationId;
193 var mainApp = ApplicationManager.focusedApplicationId;
191 verify(mainApp != "");
194 verify(mainApp != "");
192
195
196+ print("step3")
193 // Try to suspend while proximity is engaged...
197 // Try to suspend while proximity is engaged...
194 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
198 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
195 tryCompare(greeter, "showProgress", 0);
199 tryCompare(greeter, "showProgress", 0);
196
200
201+ print("step4")
197 // Now really suspend
202 // Now really suspend
198 Powerd.displayPowerStateChange(Powerd.Off, 0);
203 Powerd.displayPowerStateChange(Powerd.Off, 0);
199 tryCompare(greeter, "showProgress", 1);
204 tryCompare(greeter, "showProgress", 1);
200 tryCompare(ApplicationManager, "focusedApplicationId", "");
205 tryCompare(ApplicationManager, "focusedApplicationId", "");
201
206
207+ print("step5")
202 // And wake up
208 // And wake up
203 Powerd.displayPowerStateChange(Powerd.On, 0);
209 Powerd.displayPowerStateChange(Powerd.On, 0);
204 tryCompare(ApplicationManager, "focusedApplicationId", "");
210 tryCompare(ApplicationManager, "focusedApplicationId", "");
205 tryCompare(greeter, "showProgress", 1);
211 tryCompare(greeter, "showProgress", 1);
206
212
213+ print("step6")
207 // Swipe away greeter to focus app
214 // Swipe away greeter to focus app
208 swipeAwayGreeter();
215 swipeAwayGreeter();
209 tryCompare(ApplicationManager, "focusedApplicationId", mainApp);
216 tryCompare(ApplicationManager, "focusedApplicationId", mainApp);
@@ -503,6 +510,8 @@ Item {
503
510
504 function test_DashShown(data) {
511 function test_DashShown(data) {
505
512
513+ print("step1")
514+ // greeter: false,
506 if (data.greeter) {
515 if (data.greeter) {
507 // Swipe the greeter in
516 // Swipe the greeter in
508 var greeter = findChild(shell, "greeter");
517 var greeter = findChild(shell, "greeter");
@@ -510,21 +519,31 @@ Item {
510 tryCompare(greeter, "showProgress", 1);
519 tryCompare(greeter, "showProgress", 1);
511 }
520 }
512
521
522+ print("step2")
523+ //app: false,
513 if (data.app) {
524 if (data.app) {
514 dragLauncherIntoView();
525 dragLauncherIntoView();
515 tapOnAppIconInLauncher();
526 tapOnAppIconInLauncher();
516 }
527 }
517
528
529+ print("step3")
530+ // launcher: true,
518 if (data.launcher) {
531 if (data.launcher) {
519 dragLauncherIntoView();
532 dragLauncherIntoView();
520 }
533 }
521
534
535+ print("step4")
536+ // indicators: false,
522 if (data.indicators) {
537 if (data.indicators) {
523 showIndicators();
538 showIndicators();
524 }
539 }
525
540
541+ print("step5")
542+ //expectedShown: true},
526 var dash = findChild(shell, "dash");
543 var dash = findChild(shell, "dash");
544+ print("step6", dash, dash.shown, data.expectedShown)
527 tryCompare(dash, "shown", data.expectedShown);
545 tryCompare(dash, "shown", data.expectedShown);
546+ print("step7")
528 }
547 }
529
548
530 function test_searchIndicatorHidesOnAppFocus() {
549 function test_searchIndicatorHidesOnAppFocus() {