@@ -22,13 +22,33 @@ import "../Components"
2222import Utils 0.1
2323import Ubuntu.Gestures 0.1
2424import GlobalShortcut 1.0
25+import GSettings 1.0
2526import "Spread"
2627import "Spread/MathUtils.js" as MathUtils
2728
28−AbstractStage {
29+FocusScope {
2930 id: root
3031 anchors.fill: parent
3132
33+ property QtObject applicationManager
34+ property QtObject topLevelSurfaceList
35+ property bool altTabPressed
36+ property url background
37+ property bool beingResized
38+ property int dragAreaWidth
39+ property bool interactive
40+ property bool keepDashRunning: true
41+ property real maximizedAppTopMargin
42+ property real nativeHeight
43+ property real nativeWidth
44+ property QtObject orientations
45+ property int shellOrientation
46+ property int shellOrientationAngle
47+ property bool spreadEnabled: true // If false, animations and right edge will be disabled
48+ property bool suspended
49+ property int leftMargin: 0
50+ property bool oskEnabled: false
51+
3252 // Congifuration
3353 property string mode: "staged"
3454 property real leftEdgeDragProgress: 0
@@ -91,6 +111,21 @@ AbstractStage {
91111 }
92112 }
93113
114+ GSettings {
115+ id: lifecycleExceptions
116+ schema.id: "com.canonical.qtmir"
117+ }
118+
119+ function isExemptFromLifecycle(appId) {
120+ var shortAppId = appId.split('_')[0];
121+ for (var i = 0; i < lifecycleExceptions.lifecycleExemptAppids.length; i++) {
122+ if (shortAppId === lifecycleExceptions.lifecycleExemptAppids[i]) {
123+ return true;
124+ }
125+ }
126+ return false;
127+ }
128+
94129 GlobalShortcut {
95130 id: closeFocusedShortcut
96131 shortcut: Qt.AltModifier|Qt.Key_F4
@@ -412,12 +447,9 @@ AbstractStage {
412447 script: {
413448 var item = appRepeater.itemAt(Math.max(0, spreadItem.highlightedIndex));
414449 if (item.stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
415− print("showing sidestage")
416450 sideStage.show();
417451 }
418−
419452 item.playFocusAnimation();
420− print("playing focus animation for item", item.appId, "stage:", item.stage, "shown", sideStage.shown)
421453 }
422454 }
423455 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }