@@ -105,15 +105,6 @@ AbstractStage {
105 active: priv.focusedAppDelegate !== null
105 active: priv.focusedAppDelegate !== null
109− target: root.topLevelSurfaceList
111− if (root.state == "spread") {
112− priv.goneToSpread = false;
117 QtObject {
108 QtObject {
119 objectName: "DesktopStagePrivate"
110 objectName: "DesktopStagePrivate"
@@ -129,6 +120,7 @@ AbstractStage {
129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
120 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
131 property bool goneToSpread: false
122 property bool goneToSpread: false
123+ property int closingIndex: -1
132// property int animationDuration: 4000
124// property int animationDuration: 4000
133 property int animationDuration: UbuntuAnimation.FastDuration
125 property int animationDuration: UbuntuAnimation.FastDuration
@@ -446,13 +438,16 @@ AbstractStage {
447 z: normalZ
439 z: normalZ
441+ // Normally we want x/y where we request it to be. Width/height of our delegate will
442+ // match what the actual surface size is.
443+ // Don't write to those, they will be set by states
449 x: requestedX
444 x: requestedX
450 y: requestedY
445 y: requestedY
446+ width: decoratedWindow.implicitWidth
447+ height: decoratedWindow.implicitHeight
452 // requestedX/Y/width/height is what we ask the actual surface to be.
449 // requestedX/Y/width/height is what we ask the actual surface to be.
453 // Do not write to those, they will be set by states
450 // Do not write to those, they will be set by states
454− // Also do not write to the appWindow's actual x,y,width,height as they
455− // will be set by states too.
456 property real requestedX: 0
451 property real requestedX: 0
457 property real requestedY: 0
452 property real requestedY: 0
458 property int requestedWidth: -1
453 property int requestedWidth: -1
@@ -478,8 +473,7 @@ AbstractStage {
481− width: decoratedWindow.implicitWidth
476+ Behavior on x { id: xBehavior; enabled: priv.closingIndex >= 0; UbuntuNumberAnimation { onRunningChanged: if (!running) priv.closingIndex = -1} }
482− height: decoratedWindow.implicitHeight
484 Connections {
478 Connections {
485 target: root
479 target: root
@@ -1144,7 +1138,10 @@ AbstractStage {
1144 onContainsMouseChanged: {
1138 onContainsMouseChanged: {
1145 if (containsMouse) spreadItem.highlightedIndex = index
1139 if (containsMouse) spreadItem.highlightedIndex = index
1142+ priv.closingIndex = index
1147− onClose: model.surface.close()
1143+ model.surface.close()
1150// Rectangle { anchors.fill: parent; color: "blue"; opacity: .4 }
1147// Rectangle { anchors.fill: parent; color: "blue"; opacity: .4 }