@@ -753,6 +753,14 @@ FocusScope {
753 normalHeight = appDelegate.height;
753 normalHeight = appDelegate.height;
756+ function updateRestoredGeometry() {
757+ if (appDelegate.state == "normal" || appDelegate.state == "restored") {
758+ // save the x/y to restore to
759+ restoredX = appDelegate.x;
760+ restoredY = appDelegate.y;
756 Connections {
764 Connections {
757 target: appDelegate
765 target: appDelegate
758 onXChanged: appDelegate.updateNormalGeometry();
766 onXChanged: appDelegate.updateNormalGeometry();
@@ -1626,7 +1634,7 @@ FocusScope {
1627 onMinimizeClicked: { appDelegate.requestMinimize(); }
1635 onMinimizeClicked: { appDelegate.requestMinimize(); }
1628 onDecorationPressed: { appDelegate.activate(); }
1636 onDecorationPressed: { appDelegate.activate(); }
1629− onDecorationReleased: fakeRectangle.commit();
1637+ onDecorationReleased: fakeRectangle.visible ? fakeRectangle.commit() : appDelegate.updateRestoredGeometry()
1631 property real angle: 0
1639 property real angle: 0
1632 Behavior on angle { enabled: priv.closingIndex >= 0; UbuntuNumberAnimation {} }
1640 Behavior on angle { enabled: priv.closingIndex >= 0; UbuntuNumberAnimation {} }
@@ -1670,7 +1678,7 @@ FocusScope {
1670 onFakeMaximizeBottomLeftAnimationRequested: if (!appDelegate.maximizedBottomLeft) fakeRectangle.maximizeBottomLeft(amount, true);
1678 onFakeMaximizeBottomLeftAnimationRequested: if (!appDelegate.maximizedBottomLeft) fakeRectangle.maximizeBottomLeft(amount, true);
1671 onFakeMaximizeBottomRightAnimationRequested: if (!appDelegate.maximizedBottomRight) fakeRectangle.maximizeBottomRight(amount, true);
1679 onFakeMaximizeBottomRightAnimationRequested: if (!appDelegate.maximizedBottomRight) fakeRectangle.maximizeBottomRight(amount, true);
1672 onStopFakeAnimation: fakeRectangle.stop();
1680 onStopFakeAnimation: fakeRectangle.stop();
1673− onDragReleased: fakeRectangle.commit();
1681+ onDragReleased: fakeRectangle.visible ? fakeRectangle.commit() : appDelegate.updateRestoredGeometry()
1676 WindowedFullscreenPolicy {
1684 WindowedFullscreenPolicy {