@@ -56,11 +56,16 @@ MouseArea {
56 property int normalHeight: 0
56 property int normalHeight: 0
58 function updateNormalGeometry() {
58 function updateNormalGeometry() {
59− if (root.target.state == "normal" || root.target.state == "restored") {
59+ if (root.target.state == "normal") {
60 normalX = root.target.requestedX
60 normalX = root.target.requestedX
61 normalY = root.target.requestedY
61 normalY = root.target.requestedY
62 normalWidth = root.target.width
62 normalWidth = root.target.width
63 normalHeight = root.target.height
63 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
@@ -77,7 +82,6 @@ MouseArea {
77 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
82 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
78 Qt.rect(target.windowedX, target.windowedY, defaultWidth, defaultHeight));
83 Qt.rect(target.windowedX, target.windowedY, defaultWidth, defaultHeight));
81 target.windowedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
85 target.windowedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
82 target.windowedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
86 target.windowedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
83 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });
87 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });