@@ -55,8 +55,8 @@ MouseArea {
56 function updateNormalGeometry() {
56 function updateNormalGeometry() {
57 if (root.target.state == "normal") {
57 if (root.target.state == "normal") {
58− normalX = root.target.x
58+ normalX = root.target.requestedX
59− normalY = root.target.y
59+ normalY = root.target.requestedY
60 normalWidth = root.target.width
60 normalWidth = root.target.width
61 normalHeight = root.target.height
61 normalHeight = root.target.height
@@ -73,14 +73,14 @@ MouseArea {
74 function loadWindowState() {
74 function loadWindowState() {
75 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
75 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
76− Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
76+ Qt.rect(target.requestedX, target.requestedY, defaultWidth, defaultHeight));
78 target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
78 target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
79 target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
79 target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
80 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });
80 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });
81− target.x = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth),
81+ target.requestedX = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth),
82 (target.fullscreen ? 0 : root.leftMargin)); });
82 (target.fullscreen ? 0 : root.leftMargin)); });
83− target.y = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });
83+ target.requestedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });
85 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
85 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
86 switch (windowState) {
86 switch (windowState) {
@@ -258,8 +258,8 @@ MouseArea {
258 var pos = mapToItem(root.target.parent, mouseX, mouseY);
258 var pos = mapToItem(root.target.parent, mouseX, mouseY);
259 d.startMousePosX = pos.x;
259 d.startMousePosX = pos.x;
260 d.startMousePosY = pos.y;
260 d.startMousePosY = pos.y;
261− d.startX = target.x;
261+ d.startX = target.requestedX;
262− d.startY = target.y;
262+ d.startY = target.requestedY;
263 d.startWidth = target.width;
263 d.startWidth = target.width;
264 d.startHeight = target.height;
264 d.startHeight = target.height;
265 d.currentWidth = target.width;
265 d.currentWidth = target.width;
@@ -296,7 +296,7 @@ MouseArea {
297 if (d.leftBorder) {
297 if (d.leftBorder) {
298 var newTargetX = d.startX + deltaX;
298 var newTargetX = d.startX + deltaX;
299− var rightBorderX = target.x + target.width;
299+ var rightBorderX = target.requestedX + target.width;
300 if (rightBorderX > newTargetX + d.minimumWidth) {
300 if (rightBorderX > newTargetX + d.minimumWidth) {
301 if (rightBorderX < newTargetX + d.maximumWidth) {
301 if (rightBorderX < newTargetX + d.maximumWidth) {
302 target.requestedWidth = rightBorderX - newTargetX;
302 target.requestedWidth = rightBorderX - newTargetX;
@@ -322,7 +322,7 @@ MouseArea {
323 if (d.topBorder) {
323 if (d.topBorder) {
324 var newTargetY = Math.max(d.startY + deltaY, PanelState.panelHeight); // disallow resizing up past Panel
324 var newTargetY = Math.max(d.startY + deltaY, PanelState.panelHeight); // disallow resizing up past Panel
325− var bottomBorderY = target.y + target.height;
325+ var bottomBorderY = target.requestedY + target.height;
326 if (bottomBorderY > newTargetY + d.minimumHeight) {
326 if (bottomBorderY > newTargetY + d.minimumHeight) {
327 if (bottomBorderY < newTargetY + d.maximumHeight) {
327 if (bottomBorderY < newTargetY + d.maximumHeight) {
328 target.requestedHeight = bottomBorderY - newTargetY;
328 target.requestedHeight = bottomBorderY - newTargetY;
@@ -351,13 +351,13 @@ MouseArea {
351 target: root.target
351 target: root.target
352 onWidthChanged: {
352 onWidthChanged: {
353 if (d.moveLeftBorder) {
353 if (d.moveLeftBorder) {
354− target.x += d.currentWidth - target.width;
354+ target.requestedX += d.currentWidth - target.width;
356 d.currentWidth = target.width;
356 d.currentWidth = target.width;
358 onHeightChanged: {
358 onHeightChanged: {
359 if (d.moveTopBorder) {
359 if (d.moveTopBorder) {
360− target.y += d.currentHeight - target.height;
360+ target.requestedY += d.currentHeight - target.height;
362 d.currentHeight = target.height;
362 d.currentHeight = target.height;