on xenial help sign in
get rid of the extra boolean
commit7b0b760fb826ae2b29e6ffa3bb312ad6062c4cd0 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 3 Apr 2017, 17:15 (10 years ago) parent3c6aabc
1 file changed+10−7
qml/Stage/Stage.qml+10−7
qml/Stage/Stage.qml+10−7
@@ -374,7 +374,7 @@ FocusScope {
374374 }
375375
376376 readonly property real virtualKeyboardHeight: root.inputMethodRect.height
377− property bool anyWindowAnimating: false
377+
378378 readonly property real windowDecorationHeight: units.gu(3)
379379 }
380380
@@ -1045,7 +1045,6 @@ FocusScope {
10451045 )
10461046 || appDelegate.fullscreen
10471047 || focusAnimation.running || rightEdgeFocusAnimation.running || hidingAnimation.running
1048− || priv.anyWindowAnimating // bug #1666363
10491048
10501049 function close() {
10511050 model.window.close();
@@ -1381,7 +1380,6 @@ FocusScope {
13811380 requestedX: root.availableDesktopArea.x;
13821381 requestedY: 0;
13831382 visuallyMinimized: false;
1384− visuallyMaximized: true
13851383 requestedWidth: root.availableDesktopArea.width;
13861384 requestedHeight: appContainer.height;
13871385 }
@@ -1404,7 +1402,6 @@ FocusScope {
14041402 PropertyChanges {
14051403 target: appDelegate
14061404 visuallyMinimized: false
1407− visuallyMaximized: false
14081405 }
14091406 PropertyChanges { target: touchControls; enabled: true }
14101407 PropertyChanges { target: resizeArea; enabled: true }
@@ -1597,12 +1594,18 @@ FocusScope {
15971594 to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
15981595 enabled: appDelegate.animationsEnabled
15991596 SequentialAnimation {
1600− ScriptAction { script: { priv.anyWindowAnimating = true; } }
1597+ ScriptAction { script: {
1598+ if (appDelegate.visuallyMaximized) visuallyMaximized = false; // maximized before -> going to restored
1599+ }
1600+ }
16011601 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
16021602 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,opacity,scale,requestedWidth,requestedHeight,windowedWidth,windowedHeight";
16031603 duration: priv.animationDuration }
1604− PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1605− ScriptAction { script: { fakeRectangle.stop(); priv.anyWindowAnimating = false; } }
1604+ ScriptAction { script: {
1605+ fakeRectangle.stop();
1606+ appDelegate.visuallyMaximized = appDelegate.maximized; // reflect the target state
1607+ }
1608+ }
16061609 }
16071610 }
16081611 ]