@@ -25,26 +25,11 @@ import "../Components"
2525AbstractStage {
2626 id: root
2727
28− // Controls to be set from outside
29− property int dragAreaWidth
30− property real maximizedAppTopMargin
31− property bool interactive
32− property bool spreadEnabled: true // If false, animations and right edge will be disabled
33− property real inverseProgress: 0 // This is the progress for left edge drags, in pixels.
3428 property QtObject applicationManager: ApplicationManager
3529 property bool focusFirstApp: true // If false, focused app will appear on right edge like other apps
3630 property bool altTabEnabled: true
3731 property real startScale: 1.1
3832 property real endScale: 0.7
39− property bool keepDashRunning: true
40− property bool suspended: false
41− property int shellOrientationAngle: 0
42− property int shellOrientation
43− property int shellPrimaryOrientation
44− property int nativeOrientation
45− property real nativeWidth
46− property real nativeHeight
47− property bool beingResized: false
4833 onBeingResizedChanged: {
4934 if (beingResized) {
5035 // Brace yourselves for impact!
@@ -56,6 +41,8 @@ AbstractStage {
5641 priv.reset();
5742 }
5843 }
44+
45+ // Functions to be called from outside
5946 function updateFocusedAppOrientation() {
6047 if (spreadRepeater.count > 0) {
6148 spreadRepeater.itemAt(0).matchShellOrientation();
@@ -85,16 +72,14 @@ AbstractStage {
8572 }
8673 }
8774
88− // To be read from outside
89− readonly property var mainApp: applicationManager.focusedApplicationId
75+ mainApp: applicationManager.focusedApplicationId
9076 ? applicationManager.findApplication(applicationManager.focusedApplicationId)
9177 : null
9278
93− property int mainAppWindowOrientationAngle: 0
94− readonly property bool orientationChangesEnabled: priv.focusedAppOrientationChangesEnabled
95− && !priv.focusedAppDelegateIsDislocated
96− && !(priv.focusedAppDelegate && priv.focusedAppDelegate.xBehavior.running)
97− && spreadView.phase === 0
79+ orientationChangesEnabled: priv.focusedAppOrientationChangesEnabled
80+ && !priv.focusedAppDelegateIsDislocated
81+ && !(priv.focusedAppDelegate && priv.focusedAppDelegate.xBehavior.running)
82+ && spreadView.phase === 0
9883
9984 // How far left the stage has been dragged
10085 readonly property real dragProgress: spreadRepeater.count > 0 ? -spreadRepeater.itemAt(0).xTranslate : 0
@@ -106,8 +91,6 @@ AbstractStage {
10691
10792 signal opened()
10893
109− color: "#111111"
110−
11194 function select(appId) {
11295 spreadView.snapTo(priv.indexOf(appId));
11396 }
@@ -438,19 +421,21 @@ AbstractStage {
438421 dropShadow: spreadView.active || priv.focusedAppDelegateIsDislocated
439422 focusFirstApp: root.focusFirstApp
440423
424+ readonly property bool isDash: model.appId == "unity8-dash"
425+
426+ readonly property bool canSuspend: model.isTouchApp
427+ && !isExemptFromLifecycle(model.appId)
428+
441429 Binding {
442430 target: appDelegate.application
443431 property: "requestedState"
444− value: !model.isTouchApp
445− || isExemptFromLifecycle(model.appId)
432+ value: !canSuspend
446433 || (isDash && root.keepDashRunning)
447434 || (!root.suspended && appDelegate.focus)
448435 ? ApplicationInfoInterface.RequestedRunning
449436 : ApplicationInfoInterface.RequestedSuspended
450437 }
451438
452− readonly property bool isDash: model.appId == "unity8-dash"
453−
454439 z: isDash && !spreadView.active ? -1 : behavioredIndex
455440
456441 x: {