@@ -752,6 +752,14 @@ FocusScope {
752 normalHeight = appDelegate.height;
752 normalHeight = appDelegate.height;
755+ function updateRestoredGeometry() {
756+ if (appDelegate.state == "normal" || appDelegate.state == "restored") {
757+ // save the x/y to restore to
758+ restoredX = appDelegate.x;
759+ restoredY = appDelegate.y;
755 Connections {
763 Connections {
756 target: appDelegate
764 target: appDelegate
757 onXChanged: appDelegate.updateNormalGeometry();
765 onXChanged: appDelegate.updateNormalGeometry();
@@ -1612,7 +1620,7 @@ FocusScope {
1613 onMinimizeClicked: { appDelegate.requestMinimize(); }
1621 onMinimizeClicked: { appDelegate.requestMinimize(); }
1614 onDecorationPressed: { appDelegate.activate(); }
1622 onDecorationPressed: { appDelegate.activate(); }
1615− onDecorationReleased: fakeRectangle.commit();
1623+ onDecorationReleased: fakeRectangle.visible ? fakeRectangle.commit() : appDelegate.updateRestoredGeometry()
1617 property real angle: 0
1625 property real angle: 0
1618 Behavior on angle { enabled: priv.closingIndex >= 0; UbuntuNumberAnimation {} }
1626 Behavior on angle { enabled: priv.closingIndex >= 0; UbuntuNumberAnimation {} }
@@ -1656,7 +1664,7 @@ FocusScope {
1656 onFakeMaximizeBottomLeftAnimationRequested: if (!appDelegate.maximizedBottomLeft) fakeRectangle.maximizeBottomLeft(amount, true);
1664 onFakeMaximizeBottomLeftAnimationRequested: if (!appDelegate.maximizedBottomLeft) fakeRectangle.maximizeBottomLeft(amount, true);
1657 onFakeMaximizeBottomRightAnimationRequested: if (!appDelegate.maximizedBottomRight) fakeRectangle.maximizeBottomRight(amount, true);
1665 onFakeMaximizeBottomRightAnimationRequested: if (!appDelegate.maximizedBottomRight) fakeRectangle.maximizeBottomRight(amount, true);
1658 onStopFakeAnimation: fakeRectangle.stop();
1666 onStopFakeAnimation: fakeRectangle.stop();
1659− onDragReleased: fakeRectangle.commit();
1667+ onDragReleased: fakeRectangle.visible ? fakeRectangle.commit() : appDelegate.updateRestoredGeometry()
1662 WindowedFullscreenPolicy {
1670 WindowedFullscreenPolicy {