on xenial help sign in
More fixes to the unified stages code (LP: #1637205, #1637249, #1637258)
374c0e2Michael Zanetti
qml/Stage/Stage.qml+10−8
@@ -235,6 +235,12 @@ FocusScope {
235 readonly property bool sideStageEnabled: root.mode === "stagedWithSideStage" &&
235 readonly property bool sideStageEnabled: root.mode === "stagedWithSideStage" &&
236 (root.shellOrientation == Qt.LandscapeOrientation ||
236 (root.shellOrientation == Qt.LandscapeOrientation ||
237 root.shellOrientation == Qt.InvertedLandscapeOrientation)
237 root.shellOrientation == Qt.InvertedLandscapeOrientation)
238+ onSideStageEnabledChanged: {
239+ for (var i = 0; i < appRepeater.count; i++) {
240+ appRepeater.itemAt(i).refreshStage();
241+ }
242+ priv.updateMainAndSideStageIndexes();
243+ }
238
244
239 property var mainStageDelegate: null
245 property var mainStageDelegate: null
240 property var sideStageDelegate: null
246 property var sideStageDelegate: null
@@ -255,7 +261,7 @@ FocusScope {
255 priv.sideStageItemId = 0;
261 priv.sideStageItemId = 0;
256 priv.sideStageAppId = "";
262 priv.sideStageAppId = "";
257 priv.mainStageDelegate = appRepeater.itemAt(0);
263 priv.mainStageDelegate = appRepeater.itemAt(0);
258− priv.mainStageAppId = topLevelSurfaceList.idAt(0);
264+ priv.mainStageItemId = topLevelSurfaceList.idAt(0);
259 priv.mainStageAppId = topLevelSurfaceList.applicationAt(0) ? topLevelSurfaceList.applicationAt(0).appId : ""
265 priv.mainStageAppId = topLevelSurfaceList.applicationAt(0) ? topLevelSurfaceList.applicationAt(0).appId : ""
260 return;
266 return;
261 }
267 }
@@ -451,7 +457,7 @@ FocusScope {
451 },
457 },
452 State {
458 State {
453 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
459 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
454− PropertyChanges { target: triGestureArea; enabled: true }
460+ PropertyChanges { target: triGestureArea; enabled: priv.sideStageEnabled }
455 PropertyChanges { target: sideStage; visible: true }
461 PropertyChanges { target: sideStage; visible: true }
456 },
462 },
457 State {
463 State {
@@ -552,7 +558,7 @@ FocusScope {
552 bottom: parent.bottom
558 bottom: parent.bottom
553 }
559 }
554 width: appContainer.width - sideStage.width
560 width: appContainer.width - sideStage.width
555− enabled: sideStage.enabled
561+ enabled: priv.sideStageEnabled
556
562
557 onDropped: {
563 onDropped: {
558 drop.source.appDelegate.saveStage(ApplicationInfoInterface.MainStage);
564 drop.source.appDelegate.saveStage(ApplicationInfoInterface.MainStage);
@@ -596,7 +602,7 @@ FocusScope {
596 }
602 }
597
603
598 onShownChanged: {
604 onShownChanged: {
599− if (!shown && priv.mainStageDelegate) {
605+ if (!shown && priv.mainStageDelegate && !root.spreadShown) {
600 priv.mainStageDelegate.claimFocus();
606 priv.mainStageDelegate.claimFocus();
601 }
607 }
602 }
608 }
@@ -709,10 +715,6 @@ FocusScope {
709 }
715 }
710 }
716 }
711 }
717 }
712− Connections {
713− target: priv
714− onSideStageEnabledChanged: refreshStage()
715− }
716
718
717 readonly property alias application: decoratedWindow.application
719 readonly property alias application: decoratedWindow.application
718 readonly property alias minimumWidth: decoratedWindow.minimumWidth
720 readonly property alias minimumWidth: decoratedWindow.minimumWidth