@@ -49,6 +49,9 @@ AbstractStage {
4949 // Used by TutorialRight
5050 property bool spreadShown: state == "spread"
5151
52+ // used by the snap windows (edge maximize) feature
53+ readonly property alias previewRectangle: fakeRectangle
54+
5255 mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
5356
5457 // application windows never rotate independently
@@ -82,6 +85,10 @@ AbstractStage {
8285
8386 onAltTabPressedChanged: priv.goneToSpread = altTabPressed
8487
88+ itemConfiningMouseCursor: !spreadShown && priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&
89+ priv.focusedAppDelegate.surface.confinesMousePointer ?
90+ priv.focusedAppDelegate.clientAreaItem : null;
91+
8592 GlobalShortcut {
8693 id: showSpreadShortcut
8794 shortcut: Qt.MetaModifier|Qt.Key_W
@@ -98,28 +105,27 @@ AbstractStage {
98105 id: maximizeWindowShortcut
99106 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Up
100107 onTriggered: priv.focusedAppDelegate.maximize()
101− active: priv.focusedAppDelegate !== null
108+ active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximized
102109 }
103110
104111 GlobalShortcut {
105112 id: maximizeWindowLeftShortcut
106113 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Left
107114 onTriggered: priv.focusedAppDelegate.maximizeLeft()
108− active: priv.focusedAppDelegate !== null
115+ active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximizedLeftRight
109116 }
110117
111118 GlobalShortcut {
112119 id: maximizeWindowRightShortcut
113120 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Right
114121 onTriggered: priv.focusedAppDelegate.maximizeRight()
115− active: priv.focusedAppDelegate !== null
122+ active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximizedLeftRight
116123 }
117124
118125 GlobalShortcut {
119126 id: minimizeRestoreShortcut
120127 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Down
121− onTriggered: priv.focusedAppDelegate.maximized || priv.focusedAppDelegate.maximizedLeft || priv.focusedAppDelegate.maximizedRight ||
122− priv.focusedAppDelegate.maximizedHorizontally || priv.focusedAppDelegate.maximizedVertically
128+ onTriggered: priv.focusedAppDelegate.anyMaximized
123129 ? priv.focusedAppDelegate.restoreFromMaximized() : priv.focusedAppDelegate.minimize()
124130 active: priv.focusedAppDelegate !== null
125131 }
@@ -274,7 +280,6 @@ AbstractStage {
274280 onRestoreClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.restoreFromMaximized(); } }
275281 onFocusMaximizedApp: {
276282 if (priv.foregroundMaximizedAppDelegate) {
277− print("***** focusing because of Panel request", model.application.appId)
278283 priv.foregroundMaximizedAppDelegate.focus = true;
279284 }
280285 }
@@ -436,12 +441,10 @@ AbstractStage {
436441 anchors.fill: parent
437442 focus: root.state !== "spread"
438443
439− CrossFadeImage {
444+ Wallpaper {
440445 id: wallpaper
441446 anchors.fill: parent
442447 source: root.background
443− sourceSize { height: root.height; width: root.width }
444− fillMode: Image.PreserveAspectCrop
445448 }
446449
447450 Spread {
@@ -602,7 +605,7 @@ AbstractStage {
602605 value: appDelegate.requestedY -
603606 Math.min(appDelegate.requestedY - PanelState.panelHeight,
604607 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
605− when: root.oskEnabled && appDelegate.focus && appDelegate.state == "normal"
608+ when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
606609 && SurfaceManager.inputMethodSurface
607610 && SurfaceManager.inputMethodSurface.state != Mir.HiddenState
608611 && SurfaceManager.inputMethodSurface.state != Mir.MinimizedState
@@ -616,7 +619,7 @@ AbstractStage {
616619 onShellOrientationAngleChanged: {
617620 // at this point decoratedWindow.surfaceOrientationAngle is the old shellOrientationAngle
618621 if (application && application.rotatesWindowContents) {
619− if (state == "normal") {
622+ if (state == "normal" || state == "restored") {
620623 var angleDiff = decoratedWindow.surfaceOrientationAngle - shellOrientationAngle;
621624 angleDiff = (360 + angleDiff) % 360;
622625 if (angleDiff === 90 || angleDiff === 270) {
@@ -644,14 +647,29 @@ AbstractStage {
644647 readonly property alias widthIncrement: decoratedWindow.widthIncrement
645648 readonly property alias heightIncrement: decoratedWindow.heightIncrement
646649
647− readonly property bool maximized: windowState & WindowStateStorage.WindowStateMaximized
648− readonly property bool maximizedLeft: windowState & WindowStateStorage.WindowStateMaximizedLeft
649− readonly property bool maximizedRight: windowState & WindowStateStorage.WindowStateMaximizedRight
650− readonly property bool maximizedHorizontally: windowState & WindowStateStorage.WindowStateMaximizedHorizontally
651− readonly property bool maximizedVertically: windowState & WindowStateStorage.WindowStateMaximizedVertically
650+ readonly property bool maximized: windowState === WindowStateStorage.WindowStateMaximized
651+ readonly property bool maximizedLeft: windowState === WindowStateStorage.WindowStateMaximizedLeft
652+ readonly property bool maximizedRight: windowState === WindowStateStorage.WindowStateMaximizedRight
653+ readonly property bool maximizedHorizontally: windowState === WindowStateStorage.WindowStateMaximizedHorizontally
654+ readonly property bool maximizedVertically: windowState === WindowStateStorage.WindowStateMaximizedVertically
655+ readonly property bool maximizedTopLeft: windowState === WindowStateStorage.WindowStateMaximizedTopLeft
656+ readonly property bool maximizedTopRight: windowState === WindowStateStorage.WindowStateMaximizedTopRight
657+ readonly property bool maximizedBottomLeft: windowState === WindowStateStorage.WindowStateMaximizedBottomLeft
658+ readonly property bool maximizedBottomRight: windowState === WindowStateStorage.WindowStateMaximizedBottomRight
659+ readonly property bool anyMaximized: maximized || maximizedLeft || maximizedRight || maximizedHorizontally || maximizedVertically ||
660+ maximizedTopLeft || maximizedTopRight || maximizedBottomLeft || maximizedBottomRight
661+
652662 readonly property bool minimized: windowState & WindowStateStorage.WindowStateMinimized
653663 readonly property bool fullscreen: surface && surface.state === Mir.FullscreenState;
654664
665+ readonly property bool canBeMaximized: canBeMaximizedHorizontally && canBeMaximizedVertically
666+ readonly property bool canBeMaximizedLeftRight: (maximumWidth == 0 || maximumWidth >= appContainer.width/2) &&
667+ (maximumHeight == 0 || maximumHeight >= appContainer.height)
668+ readonly property bool canBeCornerMaximized: (maximumWidth == 0 || maximumWidth >= appContainer.width/2) &&
669+ (maximumHeight == 0 || maximumHeight >= appContainer.height/2)
670+ readonly property bool canBeMaximizedHorizontally: maximumWidth == 0 || maximumWidth >= appContainer.width
671+ readonly property bool canBeMaximizedVertically: maximumHeight == 0 || maximumHeight >= appContainer.height
672+
655673 property int windowState: WindowStateStorage.WindowStateNormal
656674 property bool animationsEnabled: true
657675 property alias title: decoratedWindow.title
@@ -669,12 +687,17 @@ AbstractStage {
669687 readonly property var surface: model.surface
670688 readonly property alias resizeArea: resizeArea
671689 readonly property alias focusedSurface: decoratedWindow.focusedSurface
690+ readonly property bool dragging: touchControls.overlayShown ? touchControls.dragging : decoratedWindow.dragging
672691
673692 readonly property string appId: model.application.appId
674693 readonly property bool isDash: model.application.appId == "unity8-dash"
694+ readonly property alias clientAreaItem: decoratedWindow.clientAreaItem
675695
676696 function claimFocus() {
677697 print("(claimfocus) focusing app", priv.sideStageDelegate, appDelegate, sideStage.shown)
698+ if (root.state == "spread") {
699+ priv.goneToSpread = false;
700+ }
678701 if (root.mode == "windowed" && minimized) {
679702 restore(true)
680703 }
@@ -682,6 +705,7 @@ AbstractStage {
682705 sideStage.show();
683706 }
684707 appDelegate.focus = true;
708+ appDelegate.restore(true /* animated */, appDelegate.windowState);
685709 }
686710 Connections {
687711 target: model.surface
@@ -803,28 +827,34 @@ AbstractStage {
803827 animationsEnabled = (animated === undefined) || animated;
804828 windowState = WindowStateStorage.WindowStateMaximizedVertically;
805829 }
830+ function maximizeTopLeft(animated) {
831+ animationsEnabled = (animated === undefined) || animated;
832+ windowState = WindowStateStorage.WindowStateMaximizedTopLeft;
833+ }
834+ function maximizeTopRight(animated) {
835+ animationsEnabled = (animated === undefined) || animated;
836+ windowState = WindowStateStorage.WindowStateMaximizedTopRight;
837+ }
838+ function maximizeBottomLeft(animated) {
839+ animationsEnabled = (animated === undefined) || animated;
840+ windowState = WindowStateStorage.WindowStateMaximizedBottomLeft;
841+ }
842+ function maximizeBottomRight(animated) {
843+ animationsEnabled = (animated === undefined) || animated;
844+ windowState = WindowStateStorage.WindowStateMaximizedBottomRight;
845+ }
806846 function minimize(animated) {
807847 animationsEnabled = (animated === undefined) || animated;
808848 windowState |= WindowStateStorage.WindowStateMinimized; // add the minimized bit
809849 }
810850 function restoreFromMaximized(animated) {
811851 animationsEnabled = (animated === undefined) || animated;
812− windowState = WindowStateStorage.WindowStateNormal;
852+ windowState = WindowStateStorage.WindowStateRestored;
813853 }
814− function restore(animated) {
854+ function restore(animated,state) {
815855 animationsEnabled = (animated === undefined) || animated;
856+ windowState = state || WindowStateStorage.WindowStateRestored;
816857 windowState &= ~WindowStateStorage.WindowStateMinimized; // clear the minimized bit
817− if (maximized)
818− maximize();
819− else if (maximizedLeft)
820− maximizeLeft();
821− else if (maximizedRight)
822− maximizeRight();
823− else if (maximizedHorizontally)
824− maximizeHorizontally();
825− else if (maximizedVertically)
826− maximizeVertically();
827−
828858 print("***** focusing because of window restore", model.application.appId)
829859 focus = true;
830860 }
@@ -961,6 +991,11 @@ AbstractStage {
961991 breakPoint: spreadItem.rightEdgeBreakPoint
962992 }
963993
994+ // unlike requestedX/Y, this is the last known grab position before being pushed against edges/corners
995+ // when restoring, the window should return to these, not to the place where it was dropped near the edge
996+ property real restoredX
997+ property real restoredY
998+
964999 states: [
9651000 State {
9661001 name: "spread"; when: root.state == "spread"
@@ -1111,8 +1146,8 @@ AbstractStage {
11111146 name: "fullscreen"; when: surface ? surface.state === Mir.FullscreenState : application.fullscreen && !appDelegate.minimized
11121147 PropertyChanges {
11131148 target: appDelegate;
1114− requestedX: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? 0 : PanelState.panelHeight)
1115− requestedY: rotation == 0 ? 0 : (parent.height - height) / 2
1149+ requestedX: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? -PanelState.panelHeight : PanelState.panelHeight)
1150+ requestedY: rotation == 0 ? -PanelState.panelHeight : (parent.height - height) / 2
11161151 requestedWidth: appContainer.width;
11171152 requestedHeight: appContainer.height;
11181153 }
@@ -1134,8 +1169,24 @@ AbstractStage {
11341169 PropertyChanges { target: resizeArea; enabled: true }
11351170 PropertyChanges { target: decoratedWindow; shadowOpacity: .3}
11361171 },
1172+ State {
1173+ name: "restored";
1174+ when: appDelegate.windowState == WindowStateStorage.WindowStateRestored
1175+ extend: "normal"
1176+ PropertyChanges {
1177+ target: appDelegate;
1178+ requestedX: restoredX;
1179+ requestedY: restoredY;
1180+ }
1181+ },
1182+ State {
1183+ name: "semiMaximized"
1184+ PropertyChanges { target: touchControls; enabled: true }
1185+ PropertyChanges { target: decoratedWindow; shadowOpacity: .3 }
1186+ },
11371187 State {
11381188 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
1189+ extend: "semiMaximized"
11391190 PropertyChanges {
11401191 target: appDelegate
11411192 requestedX: root.leftMargin
@@ -1143,27 +1194,56 @@ AbstractStage {
11431194 requestedWidth: (appContainer.width - root.leftMargin)/2
11441195 requestedHeight: appContainer.height - PanelState.panelHeight
11451196 }
1146− PropertyChanges {
1147− target: decoratedWindow
1148− shadowOpacity: .3
1149− }
11501197 },
11511198 State {
11521199 name: "maximizedRight"; when: appDelegate.maximizedRight && !appDelegate.minimized
1200+ extend: "maximizedLeft"
11531201 PropertyChanges {
11541202 target: appDelegate;
11551203 requestedX: (appContainer.width + root.leftMargin)/2
1204+ }
1205+ },
1206+ State {
1207+ name: "maximizedTopLeft"; when: appDelegate.maximizedTopLeft && !appDelegate.minimized
1208+ extend: "semiMaximized"
1209+ PropertyChanges {
1210+ target: appDelegate
1211+ requestedX: root.leftMargin
11561212 requestedY: PanelState.panelHeight
11571213 requestedWidth: (appContainer.width - root.leftMargin)/2
1158− requestedHeight: appContainer.height - PanelState.panelHeight
1214+ requestedHeight: (appContainer.height - PanelState.panelHeight)/2
11591215 }
1216+ },
1217+ State {
1218+ name: "maximizedTopRight"; when: appDelegate.maximizedTopRight && !appDelegate.minimized
1219+ extend: "maximizedTopLeft"
11601220 PropertyChanges {
1161− target: decoratedWindow
1162− shadowOpacity: .3
1221+ target: appDelegate
1222+ requestedX: (appContainer.width + root.leftMargin)/2
1223+ }
1224+ },
1225+ State {
1226+ name: "maximizedBottomLeft"; when: appDelegate.maximizedBottomLeft && !appDelegate.minimized
1227+ extend: "semiMaximized"
1228+ PropertyChanges {
1229+ target: appDelegate
1230+ requestedX: root.leftMargin
1231+ requestedY: (appContainer.height + PanelState.panelHeight)/2
1232+ requestedWidth: (appContainer.width - root.leftMargin)/2
1233+ requestedHeight: appContainer.height/2
1234+ }
1235+ },
1236+ State {
1237+ name: "maximizedBottomRight"; when: appDelegate.maximizedBottomRight && !appDelegate.minimized
1238+ extend: "maximizedBottomLeft"
1239+ PropertyChanges {
1240+ target: appDelegate
1241+ requestedX: (appContainer.width + root.leftMargin)/2
11631242 }
11641243 },
11651244 State {
11661245 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
1246+ extend: "semiMaximized"
11671247 PropertyChanges {
11681248 target: appDelegate;
11691249 requestedX: root.leftMargin
@@ -1171,10 +1251,7 @@ AbstractStage {
11711251 requestedWidth: appContainer.width - root.leftMargin
11721252 requestedHeight: appDelegate.windowedHeight
11731253 }
1174− PropertyChanges {
1175− target: decoratedWindow;
1176− shadowOpacity: .3
1177− }
1254+ PropertyChanges { target: appDelegate; requestedX: root.leftMargin; requestedY: requestedY; requestedWidth: appContainer.width - root.leftMargin }
11781255 },
11791256 State {
11801257 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
@@ -1185,10 +1262,7 @@ AbstractStage {
11851262 requestedWidth: appDelegate.windowedWidth
11861263 requestedHeight: appContainer.height - PanelState.panelHeight
11871264 }
1188− PropertyChanges {
1189− target: decoratedWindow;
1190− shadowOpacity: .3
1191− }
1265+ PropertyChanges { target: appDelegate; requestedX: requestedX; requestedY: PanelState.panelHeight; requestedHeight: appContainer.height - PanelState.panelHeight }
11921266 },
11931267 State {
11941268 name: "minimized"; when: appDelegate.minimized
@@ -1199,6 +1273,7 @@ AbstractStage {
11991273 x: -appDelegate.width / 2;
12001274 y: requestedY // TODO: Should be where the icon is in the launcher. Lets just move it horizontally to the left for now.
12011275 scale: units.gu(5) / appDelegate.width
1276+ requestedX: -appDelegate.width / 2
12021277 opacity: 0;
12031278 visuallyMinimized: true
12041279 visuallyMaximized: false
@@ -1210,11 +1285,11 @@ AbstractStage {
12101285 from: "staged,stagedWithSideStage"; to: "normal"
12111286 enabled: appDelegate.animationsEnabled
12121287 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1213− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
1288+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
12141289 },
12151290 Transition {
1216− from: "normal,maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight"; to: "staged,stagedWithSideStage"
1217− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight"; duration: priv.animationDuration}
1291+ from: "normal,maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight"; to: "staged,stagedWithSideStage"
1292+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
12181293 },
12191294 Transition {
12201295 from: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,minimized"; to: "normal"
@@ -1222,12 +1297,6 @@ AbstractStage {
12221297 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
12231298 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
12241299 },
1225− Transition {
1226− from: "normal"; to: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight"
1227− enabled: appDelegate.animationsEnabled
1228− PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1229− UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration }
1230− },
12311300 Transition {
12321301 to: "minimized"
12331302 enabled: appDelegate.animationsEnabled
@@ -1248,20 +1317,9 @@ AbstractStage {
12481317 }
12491318 }
12501319 },
1251− Transition {
1252− to: "maximized,fullscreen"
1253− enabled: appDelegate.animationsEnabled
1254− SequentialAnimation {
1255− PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1256− ParallelAnimation {
1257− UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
1258− }
1259− PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1260− }
1261− },
12621320 Transition {
12631321 to: "spread"
1264− // DecoratedWindow wants the sceleToPreviewSize set before enabling scaleToPreview
1322+ // DecoratedWindow wants the scaleToPreviewSize set before enabling scaleToPreview
12651323 PropertyAction { target: appDelegate; property: "z" }
12661324 PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
12671325 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
@@ -1308,6 +1366,16 @@ AbstractStage {
13081366 // We need to release scaleToPreviewSize at last
13091367 PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
13101368 }
1369+ },
1370+ Transition {
1371+ to: "*" // "catch-all for maximized,fullscreen..."
1372+ enabled: appDelegate.animationsEnabled
1373+ SequentialAnimation {
1374+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1375+ UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight"; duration: priv.animationDuration }
1376+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1377+ ScriptAction { script: { fakeRectangle.stop(); } }
1378+ }
13111379 }
13121380 ]
13131381
@@ -1363,12 +1431,13 @@ AbstractStage {
13631431 focus: true
13641432 interactive: root.interactive
13651433 showDecoration: 1
1366− maximizeButtonShown: (maximumWidth == 0 || maximumWidth >= appContainer.width) &&
1367− (maximumHeight == 0 || maximumHeight >= appContainer.height)
1434+ maximizeButtonShown: appDelegate.canBeMaximized
13681435 overlayShown: touchControls.overlayShown
13691436 width: implicitWidth
13701437 height: implicitHeight
13711438 highlightSize: windowInfoItem.iconMargin / 2
1439+ stageWidth: appContainer.width
1440+ stageHeight: appContainer.height
13721441
13731442 requestedWidth: appDelegate.requestedWidth
13741443 requestedHeight: appDelegate.requestedHeight
@@ -1380,16 +1449,12 @@ AbstractStage {
13801449 onRequestedHeightChanged: oldRequestedHeight = requestedHeight
13811450
13821451 onCloseClicked: { appDelegate.close(); }
1383− onMaximizeClicked: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
1384− || appDelegate.maximizedHorizontally || appDelegate.maximizedVertically
1385− ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
1452+ onMaximizeClicked: appDelegate.anyMaximized ? appDelegate.restoreFromMaximized() : appDelegate.maximize();
13861453 onMaximizeHorizontallyClicked: appDelegate.maximizedHorizontally ? appDelegate.restoreFromMaximized() : appDelegate.maximizeHorizontally()
13871454 onMaximizeVerticallyClicked: appDelegate.maximizedVertically ? appDelegate.restoreFromMaximized() : appDelegate.maximizeVertically()
13881455 onMinimizeClicked: appDelegate.minimize()
1389− onDecorationPressed: {
1390− print("focusing because of decoration press");
1391− appDelegate.focus = true;
1392− }
1456+ onDecorationPressed: { appDelegate.focus = true; }
1457+ onDecorationReleased: fakeRectangle.commit();
13931458
13941459 property real angle: 0
13951460 property real itemScale: 1
@@ -1415,10 +1480,21 @@ AbstractStage {
14151480
14161481 WindowControlsOverlay {
14171482 id: touchControls
1418− anchors.fill: appDelegate
14191483 target: appDelegate
14201484 enabled: false
14211485 visible: enabled
1486+ stageWidth: appContainer.width
1487+ stageHeight: appContainer.height
1488+
1489+ onFakeMaximizeAnimationRequested: if (!appDelegate.maximized) fakeRectangle.maximize(amount, true)
1490+ onFakeMaximizeLeftAnimationRequested: if (!appDelegate.maximizedLeft) fakeRectangle.maximizeLeft(amount, true)
1491+ onFakeMaximizeRightAnimationRequested: if (!appDelegate.maximizedRight) fakeRectangle.maximizeRight(amount, true)
1492+ onFakeMaximizeTopLeftAnimationRequested: if (!appDelegate.maximizedTopLeft) fakeRectangle.maximizeTopLeft(amount, true);
1493+ onFakeMaximizeTopRightAnimationRequested: if (!appDelegate.maximizedTopRight) fakeRectangle.maximizeTopRight(amount, true);
1494+ onFakeMaximizeBottomLeftAnimationRequested: if (!appDelegate.maximizedBottomLeft) fakeRectangle.maximizeBottomLeft(amount, true);
1495+ onFakeMaximizeBottomRightAnimationRequested: if (!appDelegate.maximizedBottomRight) fakeRectangle.maximizeBottomRight(amount, true);
1496+ onStopFakeAnimation: fakeRectangle.stop();
1497+ onDragReleased: fakeRectangle.commit();
14221498 }
14231499
14241500 WindowedFullscreenPolicy {
@@ -1502,6 +1578,14 @@ AbstractStage {
15021578 }
15031579 }
15041580
1581+ FakeMaximizeDelegate {
1582+ id: fakeRectangle
1583+ target: priv.focusedAppDelegate
1584+ leftMargin: root.leftMargin
1585+ appContainerWidth: appContainer.width
1586+ appContainerHeight: appContainer.height
1587+ }
1588+
15051589 EdgeBarrier {
15061590 id: edgeBarrier
15071591