@@ -291,8 +291,8 @@ AbstractStage {
291291 x: priv.focusedAppDelegate ? priv.focusedAppDelegate.x + units.gu(3) : (normalZ - 1) * units.gu(3)
292292 y: priv.focusedAppDelegate ? priv.focusedAppDelegate.y + units.gu(3) : normalZ * units.gu(3)
293293
294− width: decoratedWindow.width
295− height: decoratedWindow.height
294+ width: decoratedWindow.implicitWidth
295+ height: decoratedWindow.implicitHeight
296296 property int requestedWidth: -1
297297 property int requestedHeight: -1
298298 property alias minimumWidth: decoratedWindow.minimumWidth
@@ -486,8 +486,8 @@ AbstractStage {
486486 StagedRightEdgeMaths {
487487 id: stagedRightEdgeMaths
488488 itemIndex: index
489− sceneWidth: root.width
490− sceneHeight: root.height
489+ sceneWidth: appContainer.width - root.leftMargin
490+ sceneHeight: appContainer.height
491491 progress: 0
492492 targetX: spreadMaths.animatedX
493493 targetAngle: spreadMaths.animatedAngle
@@ -507,7 +507,7 @@ AbstractStage {
507507 }
508508 ]
509509
510− onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
510+// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
511511 onRequestedWidthChanged: if (index == 0) print("requestedWidth", requestedWidth)
512512 states: [
513513 State {
@@ -517,8 +517,17 @@ AbstractStage {
517517 y: spreadMaths.animatedY
518518 z: index
519519 angle: spreadMaths.animatedAngle
520+ height: appDelegate.width
521+ }
522+ PropertyChanges {
523+ target: decoratedWindow;
524+ showDecoration: false;
525+ height: units.gu(15)
526+ width: units.gu(15)
527+ requestedWidth: decoratedWindow.oldRequestedWidth
528+ requestedHeight: decoratedWindow.oldRequestedHeight
529+// resizeSurface: false;
520530 }
521− PropertyChanges { target: decoratedWindow; showDecoration: false }
522531 PropertyChanges { target: inputBlocker; enabled: true }
523532 },
524533 State {
@@ -531,12 +540,17 @@ AbstractStage {
531540 target: appDelegate
532541 y: PanelState.panelHeight
533542 x: stagedRightEdgeMaths.animatedX
534− requestedWidth: stagedRightEdgeMaths.animatedWidth
535− requestedHeight: stagedRightEdgeMaths.animatedHeight
536543 angle: stagedRightEdgeMaths.animatedAngle
537544 z: index
538545 }
539− PropertyChanges { target: decoratedWindow; showDecoration: false }
546+ PropertyChanges {
547+ target: decoratedWindow;
548+ showDecoration: false
549+ requestedWidth: stagedRightEdgeMaths.animatedWidth
550+ requestedHeight: stagedRightEdgeMaths.animatedHeight
551+ width: appContainer.width - root.leftMargin
552+ height: appContainer.height
553+ }
540554 },
541555 State {
542556 name: "staged"; when: root.state == "staged"
@@ -549,6 +563,8 @@ AbstractStage {
549563 target: decoratedWindow
550564 requestedWidth: appContainer.width - root.leftMargin;
551565 requestedHeight: appContainer.height;
566+ width: requestedWidth
567+ height: requestedHeight
552568 showDecoration: false
553569 }
554570 PropertyChanges {
@@ -747,6 +763,11 @@ AbstractStage {
747763 requestedWidth: appDelegate.requestedWidth
748764 requestedHeight: appDelegate.requestedHeight
749765
766+ property int oldRequestedWidth: -1
767+ property int oldRequestedHeight: -1
768+ onRequestedWidthChanged: oldRequestedWidth = requestedWidth
769+ onRequestedHeightChanged: oldRequestedHeight = requestedHeight
770+
750771 onClose: { appDelegate.close(); }
751772 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
752773 ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
@@ -765,12 +786,20 @@ AbstractStage {
765786
766787 MouseArea {
767788 id: inputBlocker
789+ anchors.fill: parent
768790 enabled: false
791+ onPressed: mouse.accepted = true;
769792 onClicked: {
770793 print("focusing because of inputBlocker click")
771794 appDelegate.focus = true
795+ priv.goneToSpread = false;
772796 }
773797 }
798+ Rectangle {
799+ anchors.fill: parent
800+ color: "blue"
801+ opacity: .4
802+ }
774803 }
775804 }
776805 }