@@ -1380,7 +1380,6 @@ FocusScope {
1380 requestedX: root.availableDesktopArea.x;
1380 requestedX: root.availableDesktopArea.x;
1381 requestedY: 0;
1381 requestedY: 0;
1382 visuallyMinimized: false;
1382 visuallyMinimized: false;
1383− visuallyMaximized: true
1384 requestedWidth: root.availableDesktopArea.width;
1383 requestedWidth: root.availableDesktopArea.width;
1385 requestedHeight: appContainer.height;
1384 requestedHeight: appContainer.height;
@@ -1403,7 +1402,6 @@ FocusScope {
1403 PropertyChanges {
1402 PropertyChanges {
1404 target: appDelegate
1403 target: appDelegate
1405 visuallyMinimized: false
1404 visuallyMinimized: false
1406− visuallyMaximized: false
1408 PropertyChanges { target: touchControls; enabled: true }
1406 PropertyChanges { target: touchControls; enabled: true }
1409 PropertyChanges { target: resizeArea; enabled: true }
1407 PropertyChanges { target: resizeArea; enabled: true }
@@ -1596,11 +1594,18 @@ FocusScope {
1596 to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1594 to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1597 enabled: appDelegate.animationsEnabled
1595 enabled: appDelegate.animationsEnabled
1598 SequentialAnimation {
1596 SequentialAnimation {
1597+ ScriptAction { script: {
1598+ if (appDelegate.visuallyMaximized) visuallyMaximized = false; // maximized before -> going to restored
1599 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1601 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1600 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,opacity,scale,requestedWidth,requestedHeight,windowedWidth,windowedHeight";
1602 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,opacity,scale,requestedWidth,requestedHeight,windowedWidth,windowedHeight";
1601 duration: priv.animationDuration }
1603 duration: priv.animationDuration }
1602− PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1603− ScriptAction { script: { fakeRectangle.stop(); } }
1604+ ScriptAction { script: {
1605+ fakeRectangle.stop();
1606+ appDelegate.visuallyMaximized = appDelegate.maximized; // reflect the target state