on xenial help sign in
fix mimizing/restore
c7f3af1Michael Zanetti
qml/Stage/Stage.qml+12−6
@@ -578,11 +578,14 @@ AbstractStage {
578 readonly property alias resizeArea: resizeArea
578 readonly property alias resizeArea: resizeArea
579
579
580 function claimFocus() {
580 function claimFocus() {
581− appDelegate.focus = true;
582 print("focusing app", priv.sideStageDelegate, appDelegate, sideStage.shown)
581 print("focusing app", priv.sideStageDelegate, appDelegate, sideStage.shown)
582+ if (root.mode == "windowed" && minimized) {
583+ restore(true)
584+ }
583 if (appDelegate.stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
585 if (appDelegate.stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
584 sideStage.show();
586 sideStage.show();
585 }
587 }
588+ appDelegate.focus = true;
586 }
589 }
587 Connections {
590 Connections {
588 target: model.surface
591 target: model.surface
@@ -1008,11 +1011,14 @@ AbstractStage {
1008 State {
1011 State {
1009 name: "minimized"; when: appDelegate.minimized
1012 name: "minimized"; when: appDelegate.minimized
1010 PropertyChanges {
1013 PropertyChanges {
1011− target: appDelegate;
1014+ target: appDelegate
1015+ requestedWidth: decoratedWindow.oldRequestedWidth
1016+ requestedHeight: decoratedWindow.oldRequestedHeight
1012 x: -appDelegate.width / 2;
1017 x: -appDelegate.width / 2;
1018+ y: requestedY // TODO: Should be where the icon is in the launcher. Lets just move it horizontally to the left for now.
1013− scale: units.gu(5) / appDelegate.width;
1019+ scale: units.gu(5) / appDelegate.width
1014 opacity: 0;
1020 opacity: 0;
1015− visuallyMinimized: true;
1021+ visuallyMinimized: true
1016 visuallyMaximized: false
1022 visuallyMaximized: false
1017 }
1023 }
1018 }
1024 }
@@ -1026,10 +1032,10 @@ AbstractStage {
1026 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
1032 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
1027 },
1033 },
1028 Transition {
1034 Transition {
1029− from: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight"; to: "normal"
1035+ from: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,minimized"; to: "normal"
1030 enabled: appDelegate.animationsEnabled
1036 enabled: appDelegate.animationsEnabled
1031 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1037 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1032− UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration }
1038+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
1033 },
1039 },
1034 Transition {
1040 Transition {
1035 from: "normal"; to: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight"
1041 from: "normal"; to: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight"