@@ -112,6 +112,7 @@ Item {
114 onApplicationRemoved: {
114 onApplicationRemoved: {
115 if (priv.mainStageAppId == appId) {
116 if (priv.mainStageAppId == appId) {
116 priv.mainStageAppId = "";
117 priv.mainStageAppId = "";
@@ -119,6 +120,9 @@ Item {
119 priv.sideStageAppId = "";
120 priv.sideStageAppId = "";
123+ onApplicationAdded: {
124 function printStack() {
128 function printStack() {
@@ -260,14 +264,12 @@ Item {
260 // We don't want to really reorder them in the model because that allows us to keep track
264 // We don't want to really reorder them in the model because that allows us to keep track
261 // of the last focused order.
265 // of the last focused order.
262 function indexToZIndex(index) {
266 function indexToZIndex(index) {
263− print("zIndex calc for index", index);
264 var app = ApplicationManager.get(index);
267 var app = ApplicationManager.get(index);
265 if (!app) {
268 if (!app) {
266 return index;
269 return index;
269 var isActive = app.appId == priv.mainStageAppId || app.appId == priv.sideStageAppId;
272 var isActive = app.appId == priv.mainStageAppId || app.appId == priv.sideStageAppId;
270− print("got app", app.appId, isActive)
271 if (isActive && app.stage == ApplicationInfoInterface.MainStage) return 0;
273 if (isActive && app.stage == ApplicationInfoInterface.MainStage) return 0;
272 if (isActive && app.stage == ApplicationInfoInterface.SideStage) {
274 if (isActive && app.stage == ApplicationInfoInterface.SideStage) {
273 if (!priv.mainStageAppId) {
275 if (!priv.mainStageAppId) {
@@ -290,6 +292,9 @@ Item {
291 return 1;
293 return 1;
295+ if (index == 2 && spreadView.nextInStack == 1 && priv.sideStageAppId) {
293 return index;
298 return index;
@@ -320,13 +325,11 @@ Item {
321 Rectangle {
326 Rectangle {
322 id: spreadRow
327 id: spreadRow
323− //color: "black"
328+ color: "black"
324 x: spreadView.contentX
329 x: spreadView.contentX
325 height: root.height
330 height: root.height
326 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
331 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
328− color: "transparent"
330 Repeater {
333 Repeater {
331 id: spreadRepeater
334 id: spreadRepeater
332 model: ApplicationManager
335 model: ApplicationManager
@@ -337,9 +340,6 @@ Item {
337 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
340 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
338 x: spreadView.width
341 x: spreadView.width
339 z: spreadView.indexToZIndex(index)
342 z: spreadView.indexToZIndex(index)
341− onWidthChanged: print("width changed!", width)
343 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
343 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
344 zIndex: z
344 zIndex: z
345 selected: spreadView.selectedIndex == index
345 selected: spreadView.selectedIndex == index
@@ -425,6 +425,7 @@ Item {
425 anchors.fill: parent
425 anchors.fill: parent
426 property int startX
426 property int startX
427 property var gesturePoints: new Array()
427 property var gesturePoints: new Array()
428+ enabled: spreadView.contentX == 0
428 onPressed: {
429 onPressed: {
429 gesturePoints = [];
430 gesturePoints = [];
430 startX = mouseX;
431 startX = mouseX;