@@ -913,8 +913,8 @@ AbstractStage {
913 name: "maximized"; when: root.state === "windowed" && appDelegate.maximized && !appDelegate.minimized
913 name: "maximized"; when: root.state === "windowed" && appDelegate.maximized && !appDelegate.minimized
914 PropertyChanges {
914 PropertyChanges {
915 target: appDelegate;
915 target: appDelegate;
916− x: root.leftMargin;
916+ requestedX: root.leftMargin;
917− y: 0;
917+ requestedY: 0;
918 visuallyMinimized: false;
918 visuallyMinimized: false;
919 visuallyMaximized: true
919 visuallyMaximized: true
920 requestedWidth: appContainer.width - root.leftMargin;
920 requestedWidth: appContainer.width - root.leftMargin;
@@ -925,8 +925,8 @@ AbstractStage {
925 name: "fullscreen"; when: surface ? surface.state === Mir.FullscreenState : application.fullscreen && !appDelegate.minimized
925 name: "fullscreen"; when: surface ? surface.state === Mir.FullscreenState : application.fullscreen && !appDelegate.minimized
926 PropertyChanges {
926 PropertyChanges {
927 target: appDelegate;
927 target: appDelegate;
928− x: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? 0 : PanelState.panelHeight)
928+ requestedX: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? 0 : PanelState.panelHeight)
929− y: rotation == 0 ? 0 : (parent.height - height) / 2
929+ requestedY: rotation == 0 ? 0 : (parent.height - height) / 2
930 requestedWidth: appContainer.width;
930 requestedWidth: appContainer.width;
931 requestedHeight: appContainer.height;
931 requestedHeight: appContainer.height;
@@ -952,13 +952,13 @@ AbstractStage {
952 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
952 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
953 PropertyChanges {
953 PropertyChanges {
954 target: appDelegate
954 target: appDelegate
955+ requestedX: root.leftMargin
956+ requestedY: PanelState.panelHeight
955− x: root.leftMargin
957+ requestedWidth: (appContainer.width - root.leftMargin)/2
956− y: PanelState.panelHeight
958+ requestedHeight: appContainer.height - PanelState.panelHeight
958 PropertyChanges {
960 PropertyChanges {
959 target: decoratedWindow
961 target: decoratedWindow
960− requestedWidth: (appContainer.width - root.leftMargin)/2
961− requestedHeight: appContainer.height - PanelState.panelHeight
962 shadowOpacity: .3
962 shadowOpacity: .3
@@ -966,31 +966,41 @@ AbstractStage {
966 name: "maximizedRight"; when: appDelegate.maximizedRight && !appDelegate.minimized
966 name: "maximizedRight"; when: appDelegate.maximizedRight && !appDelegate.minimized
967 PropertyChanges {
967 PropertyChanges {
968 target: appDelegate;
968 target: appDelegate;
969− x: (appContainer.width + root.leftMargin)/2
969+ requestedX: (appContainer.width + root.leftMargin)/2
970+ requestedY: PanelState.panelHeight
971+ requestedWidth: (appContainer.width - root.leftMargin)/2
970− y: PanelState.panelHeight
972+ requestedHeight: appContainer.height - PanelState.panelHeight
972 PropertyChanges {
974 PropertyChanges {
973 target: decoratedWindow
975 target: decoratedWindow
974− requestedWidth: (appContainer.width - root.leftMargin)/2
975− requestedHeight: appContainer.height - PanelState.panelHeight
976 shadowOpacity: .3
976 shadowOpacity: .3
980 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
980 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
981− PropertyChanges { target: appDelegate; x: root.leftMargin }
982 PropertyChanges {
981 PropertyChanges {
983− target: decoratedWindow;
982+ target: appDelegate;
983+ requestedX: root.leftMargin
984+ requestedY: appDelegate.windowedY
984 requestedWidth: appContainer.width - root.leftMargin
985 requestedWidth: appContainer.width - root.leftMargin
986+ requestedHeight: appDelegate.windowedHeight
989+ target: decoratedWindow;
985 shadowOpacity: .3
990 shadowOpacity: .3
989 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
994 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
990− PropertyChanges { target: appDelegate; y: PanelState.panelHeight }
991 PropertyChanges {
995 PropertyChanges {
992− target: decoratedWindow;
996+ target: appDelegate;
997+ requestedX: appDelegate.windowedX
998+ requestedY: PanelState.panelHeight
999+ requestedWidth: appDelegate.windowedWidth
993 requestedHeight: appContainer.height - PanelState.panelHeight
1000 requestedHeight: appContainer.height - PanelState.panelHeight
1003+ target: decoratedWindow;
994 shadowOpacity: .3
1004 shadowOpacity: .3
@@ -1015,10 +1025,16 @@ AbstractStage {
1015 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
1025 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
1017 Transition {
1027 Transition {
1018− from: "maximized"; to: "normal"
1028+ from: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight"; to: "normal"
1029+ enabled: appDelegate.animationsEnabled
1030+ PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1031+ UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration }
1034+ from: "normal"; to: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight"
1019 enabled: appDelegate.animationsEnabled
1035 enabled: appDelegate.animationsEnabled
1020 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1036 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1021− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight"; duration: priv.animationDuration }
1037+ UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration }
1023 Transition {
1039 Transition {
1024 from: "spread"; to: "*"
1040 from: "spread"; to: "*"
@@ -1052,7 +1068,7 @@ AbstractStage {
1052 SequentialAnimation {
1068 SequentialAnimation {
1053 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1069 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1054 ParallelAnimation {
1070 ParallelAnimation {
1055− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
1071+ UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
1057 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1073 PropertyAction { target: appDelegate; property: "visuallyMaximized" }