@@ -83,17 +83,18 @@ Item {
85 function handlePressedChanged(pressed, pressedButtons, mouseX, mouseY) {
85 function handlePressedChanged(pressed, pressedButtons, mouseX, mouseY) {
86− if (pressed && pressedButtons == Qt.LeftButton) {
86+ if (pressed && pressedButtons === Qt.LeftButton) {
87 var pos = mapToItem(target, mouseX, mouseY);
87 var pos = mapToItem(target, mouseX, mouseY);
88 if (target.anyMaximized) {
88 if (target.anyMaximized) {
89 // keep distanceX relative to the normal window width minus the window control buttons (+spacing)
89 // keep distanceX relative to the normal window width minus the window control buttons (+spacing)
90 // so that dragging it back doesn't make the window jump around to weird positions, away from the mouse pointer
90 // so that dragging it back doesn't make the window jump around to weird positions, away from the mouse pointer
91 priv.distanceX = MathUtils.clampAndProject(pos.x, 0, target.width, buttonsWidth, target.resizeArea.normalWidth);
91 priv.distanceX = MathUtils.clampAndProject(pos.x, 0, target.width, buttonsWidth, target.resizeArea.normalWidth);
92+ priv.distanceY = MathUtils.clampAndProject(pos.y, 0, target.height, 0, target.resizeArea.normalHeight);
93 priv.distanceX = pos.x;
94 priv.distanceX = pos.x;
95+ priv.distanceY = pos.y;
96− priv.distanceY = pos.y;
97 priv.dragging = true;
98 priv.dragging = true;
99 priv.dragging = false;
100 priv.dragging = false;