on xenial help sign in
fix restoring windows back to their normal x/y from semi-maximized
commit3da58cf714c47672ad2db14ab55a05fc69f6306f authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 5 Dec 2016, 17:17 (10 years ago) parentaaf581a
1 file changed+6−2
qml/Stage/WindowResizeArea.qml+6−2
qml/Stage/WindowResizeArea.qml+6−2
@@ -56,11 +56,16 @@ MouseArea {
5656 property int normalHeight: 0
5757
5858 function updateNormalGeometry() {
59− if (root.target.state == "normal" || root.target.state == "restored") {
59+ if (root.target.state == "normal") {
6060 normalX = root.target.requestedX
6161 normalY = root.target.requestedY
6262 normalWidth = root.target.width
6363 normalHeight = root.target.height
64+ } else if (root.target.state == "restored") {
65+ normalX = root.target.restoredX
66+ normalY = root.target.restoredY
67+ normalWidth = root.target.width
68+ normalHeight = root.target.height
6469 }
6570 }
6671 }
@@ -77,7 +82,6 @@ MouseArea {
7782 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
7883 Qt.rect(target.windowedX, target.windowedY, defaultWidth, defaultHeight));
7984
80−
8185 target.windowedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
8286 target.windowedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
8387 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });