@@ -112,6 +112,7 @@ Item {
112112 }
113113
114114 onApplicationRemoved: {
115+ printStack()
115116 if (priv.mainStageAppId == appId) {
116117 priv.mainStageAppId = "";
117118 }
@@ -119,6 +120,9 @@ Item {
119120 priv.sideStageAppId = "";
120121 }
121122 }
123+ onApplicationAdded: {
124+ printStack()
125+ }
122126 }
123127
124128 function printStack() {
@@ -260,14 +264,12 @@ Item {
260264 // We don't want to really reorder them in the model because that allows us to keep track
261265 // of the last focused order.
262266 function indexToZIndex(index) {
263− print("zIndex calc for index", index);
264267 var app = ApplicationManager.get(index);
265268 if (!app) {
266269 return index;
267270 }
268271
269272 var isActive = app.appId == priv.mainStageAppId || app.appId == priv.sideStageAppId;
270− print("got app", app.appId, isActive)
271273 if (isActive && app.stage == ApplicationInfoInterface.MainStage) return 0;
272274 if (isActive && app.stage == ApplicationInfoInterface.SideStage) {
273275 if (!priv.mainStageAppId) {
@@ -290,6 +292,9 @@ Item {
290292 }
291293 return 1;
292294 }
295+ if (index == 2 && spreadView.nextInStack == 1 && priv.sideStageAppId) {
296+ return 3;
297+ }
293298 return index;
294299 }
295300
@@ -320,13 +325,11 @@ Item {
320325
321326 Rectangle {
322327 id: spreadRow
323− //color: "black"
328+ color: "black"
324329 x: spreadView.contentX
325330 height: root.height
326331 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
327332
328− color: "transparent"
329−
330333 Repeater {
331334 id: spreadRepeater
332335 model: ApplicationManager
@@ -337,9 +340,6 @@ Item {
337340 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
338341 x: spreadView.width
339342 z: spreadView.indexToZIndex(index)
340−
341− onWidthChanged: print("width changed!", width)
342−
343343 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
344344 zIndex: z
345345 selected: spreadView.selectedIndex == index
@@ -425,6 +425,7 @@ Item {
425425 anchors.fill: parent
426426 property int startX
427427 property var gesturePoints: new Array()
428+ enabled: spreadView.contentX == 0
428429 onPressed: {
429430 gesturePoints = [];
430431 startX = mouseX;