@@ -69,10 +69,10 @@ MouseArea {
69 Component.onCompleted: {
69 Component.onCompleted: {
70 var windowGeometry = windowStateStorage.getGeometry(root.windowId, Qt.rect(target.x, target.y, target.width, target.height))
70 var windowGeometry = windowStateStorage.getGeometry(root.windowId, Qt.rect(target.x, target.y, target.width, target.height))
71 if (windowGeometry !== undefined) {
71 if (windowGeometry !== undefined) {
72− target.x = windowGeometry.x
72+ target.width = Math.min(windowGeometry.width, root.screenWidth)
73− target.y = windowGeometry.y
73+ target.height = Math.min(windowGeometry.height, root.screenHeight - PanelState.panelHeight)
74− target.width = windowGeometry.width
74+ target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - target.width), 0)
75− target.height = windowGeometry.height
75+ target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.height), PanelState.panelHeight)
77 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
77 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
78 if (windowState === WindowStateStorage.WindowStateMaximized) {
78 if (windowState === WindowStateStorage.WindowStateMaximized) {