@@ -128,7 +128,7 @@ AbstractStage {
128128 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
129129
130130 property bool goneToSpread: false
131− property int animationDuration: UbuntuAnimation.SleepyDuration
131+ property int animationDuration: 4000//UbuntuAnimation.SleepyDuration
132132
133133 function updateForegroundMaximizedApp() {
134134 var found = false;
@@ -554,6 +554,8 @@ AbstractStage {
554554 y: spreadMaths.animatedY
555555 z: index
556556 height: decoratedWindow.height + windowInfoItem.height + units.gu(2)
557+ requestedWidth: decoratedWindow.oldRequestedWidth
558+ requestedHeight: decoratedWindow.oldRequestedHeight
557559 }
558560 PropertyChanges {
559561 target: decoratedWindow;
@@ -561,8 +563,6 @@ AbstractStage {
561563 height: units.gu(40)
562564 width: units.gu(40)
563565 angle: spreadMaths.animatedAngle
564− requestedWidth: decoratedWindow.oldRequestedWidth
565− requestedHeight: decoratedWindow.oldRequestedHeight
566566 }
567567 PropertyChanges { target: inputBlocker; enabled: true }
568568 PropertyChanges { target: windowInfoItem; opacity: 1 }
@@ -584,9 +584,9 @@ AbstractStage {
584584 target: decoratedWindow;
585585 showDecoration: false
586586 requestedWidth: stagedRightEdgeMaths.animatedWidth
587− requestedHeight: stagedRightEdgeMaths.animatedHeight
588− width: appContainer.width - root.leftMargin
589− height: appContainer.height
587+ requestedHeight: stagedRightEdgeMaths.animatedHeight - PanelState.panelHeight
588+// width: appContainer.width - root.leftMargin
589+// height: appContainer.height
590590 angle: stagedRightEdgeMaths.animatedAngle
591591 }
592592 },
@@ -596,14 +596,12 @@ AbstractStage {
596596 target: appDelegate
597597 x: appDelegate.focus ? 0 : root.width
598598 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
599+ requestedWidth: appContainer.width
600+ requestedHeight: appContainer.height - PanelState.panelHeight
599601 visuallyMaximized: true
600602 }
601603 PropertyChanges {
602604 target: decoratedWindow
603− requestedWidth: appContainer.width - root.leftMargin;
604− requestedHeight: appContainer.height;
605− width: requestedWidth
606− height: requestedHeight
607605 showDecoration: false
608606 }
609607 PropertyChanges {
@@ -619,9 +617,6 @@ AbstractStage {
619617 y: 0;
620618 visuallyMinimized: false;
621619 visuallyMaximized: true
622− }
623− PropertyChanges {
624− target: decoratedWindow
625620 requestedWidth: appContainer.width - root.leftMargin;
626621 requestedHeight: appContainer.height;
627622 }
@@ -642,12 +637,7 @@ AbstractStage {
642637 PropertyChanges {
643638 target: appDelegate;
644639 visuallyMinimized: false;
645− visuallyMaximized: false
646− }
647− PropertyChanges {
648− target: decoratedWindow
649− width: appDelegate.width
650− height: appDelegate.height
640+ visuallyMaximized: false;
651641 }
652642 },
653643 State {
@@ -704,8 +694,7 @@ AbstractStage {
704694 to: "normal"
705695 enabled: appDelegate.animationsEnabled
706696 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
707− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
708− UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
697+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
709698 },
710699 Transition {
711700 to: "minimized"
@@ -713,8 +702,8 @@ AbstractStage {
713702 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
714703 SequentialAnimation {
715704 ParallelAnimation {
716− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale"; duration: UbuntuAnimation.FastDuration }
717− UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
705+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale"; duration: priv.animationDuration }
706+ UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration }
718707 }
719708 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
720709 ScriptAction {
@@ -728,13 +717,12 @@ AbstractStage {
728717 }
729718 },
730719 Transition {
731− to: "maximized,fullscreen" //maximized and fullscreen
720+ to: "maximized,fullscreen"
732721 enabled: appDelegate.animationsEnabled
733− PropertyAction { target: appDelegate; property: "visuallyMinimized" }
734722 SequentialAnimation {
723+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
735724 ParallelAnimation {
736− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale"; duration: UbuntuAnimation.FastDuration }
737− UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
725+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
738726 }
739727 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
740728 }
@@ -745,14 +733,20 @@ AbstractStage {
745733 PropertyAnimation { target: decoratedWindow; properties: "width,height,angle"; duration: priv.animationDuration }
746734 },
747735 Transition {
748− from: "spread"; to: "staged"
736+ from: "spread"; to: "staged,normal"
749737 PropertyAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
750738 PropertyAnimation { target: decoratedWindow; properties: "angle,width,height"; duration: priv.animationDuration }
751739 },
752740 Transition {
753− from: "windowed"; to: "staged";
754− PropertyAnimation { target: appDelegate; properties: "x,y,width,height"; duration: priv.animationDuration }
741+ from: "normal"; to: "staged";
742+ PropertyAnimation { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight"; duration: priv.animationDuration }
743+ },
744+ Transition {
745+ to: "staged"
746+ PropertyAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
747+ PropertyAnimation { target: appDelegate; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration }
755748 }
749+
756750 ]
757751
758752// Binding {
@@ -821,6 +815,8 @@ AbstractStage {
821815 focus: true
822816 showDecoration: true
823817 overlayShown: touchControls.overlayShown
818+ width: implicitWidth
819+ height: implicitHeight
824820
825821 requestedWidth: appDelegate.requestedWidth
826822 requestedHeight: appDelegate.requestedHeight