@@ -879,13 +879,7 @@ FocusScope {
879879 } else if (model.window.state === Mir.MaximizedBottomRightState) {
880880 appDelegate.maximizeBottomRight();
881881 } else if (model.window.state === Mir.RestoredState) {
882− if (decoratedWindow.dragging) {
883− appDelegate.restore(false, WindowStateStorage.WindowStateNormal);
884− } else if (appDelegate.anyMaximized) {
885− appDelegate.restoreFromMaximized()
886− } else {
887− appDelegate.restore();
888− }
882+ appDelegate.restore();
889883 }
890884 }
891885 }
@@ -918,7 +912,6 @@ FocusScope {
918912 if (visuallyMaximized) {
919913 priv.updateForegroundMaximizedApp();
920914 }
921−
922915 }
923916
924917 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
@@ -982,10 +975,6 @@ FocusScope {
982975 animationsEnabled = (animated === undefined) || animated;
983976 windowState |= WindowStateStorage.WindowStateMinimized; // add the minimized bit
984977 }
985− function restoreFromMaximized(animated) {
986− animationsEnabled = (animated === undefined) || animated;
987− windowState = WindowStateStorage.WindowStateRestored;
988− }
989978 function restore(animated,state) {
990979 animationsEnabled = (animated === undefined) || animated;
991980 windowState = state || WindowStateStorage.WindowStateRestored;
@@ -1304,15 +1293,9 @@ FocusScope {
13041293 windowedY: restoredY;
13051294 }
13061295 },
1307− State {
1308− name: "semiMaximized"
1309− PropertyChanges { target: touchControls; enabled: true }
1310− PropertyChanges { target: resizeArea; enabled: true }
1311− PropertyChanges { target: decoratedWindow; shadowOpacity: .3 }
1312− },
13131296 State {
13141297 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
1315− extend: "semiMaximized"
1298+ extend: "restored"
13161299 PropertyChanges {
13171300 target: appDelegate
13181301 windowedX: root.leftMargin
@@ -1331,7 +1314,7 @@ FocusScope {
13311314 },
13321315 State {
13331316 name: "maximizedTopLeft"; when: appDelegate.maximizedTopLeft && !appDelegate.minimized
1334− extend: "semiMaximized"
1317+ extend: "restored"
13351318 PropertyChanges {
13361319 target: appDelegate
13371320 windowedX: root.leftMargin
@@ -1350,7 +1333,7 @@ FocusScope {
13501333 },
13511334 State {
13521335 name: "maximizedBottomLeft"; when: appDelegate.maximizedBottomLeft && !appDelegate.minimized
1353− extend: "semiMaximized"
1336+ extend: "restored"
13541337 PropertyChanges {
13551338 target: appDelegate
13561339 windowedX: root.leftMargin
@@ -1369,13 +1352,13 @@ FocusScope {
13691352 },
13701353 State {
13711354 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
1372− extend: "semiMaximized"
1355+ extend: "restored"
13731356 PropertyChanges { target: appDelegate; requestedX: root.leftMargin; requestedY: windowedY;
13741357 requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appDelegate.windowedHeight }
13751358 },
13761359 State {
13771360 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
1378− extend: "semiMaximized"
1361+ extend: "restored"
13791362 PropertyChanges { target: appDelegate; requestedX: windowedX; requestedY: PanelState.panelHeight;
13801363 requestedWidth: appDelegate.windowedWidth; requestedHeight: appContainer.height - PanelState.panelHeight }
13811364 },
@@ -1403,14 +1386,6 @@ FocusScope {
14031386 to: "staged,stagedWithSideStage"
14041387 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
14051388 },
1406− Transition {
1407− from: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight,minimized";
1408− to: "normal,restored"
1409− enabled: appDelegate.animationsEnabled
1410− PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1411− UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,requestedWidth,requestedHeight,windowedWidth,windowedHeight,scale";
1412− duration: priv.animationDuration }
1413− },
14141389 Transition {
14151390 to: "minimized"
14161391 enabled: appDelegate.animationsEnabled
@@ -1470,8 +1445,8 @@ FocusScope {
14701445 },
14711446 Transition {
14721447 id: windowedTransition
1473− from: "normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1474− to: "normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1448+ from: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen,minimized"
1449+ to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
14751450 enabled: appDelegate.animationsEnabled
14761451 SequentialAnimation {
14771452 PropertyAction { target: appDelegate; property: "visuallyMinimized" }