on xenial help sign in
minor fixes and cleanups
ba4131fLukáš Tinkl
qml/Shell.qml−1
@@ -826,7 +826,6 @@ StyledItem {
826 }
826 }
827 onPushStopped: {
827 onPushStopped: {
828 if (previewRectangle) {
828 if (previewRectangle) {
829− print("!!! Cancelling preview", previewRectangle.progress)
830 previewRectangle.stop();
829 previewRectangle.stop();
831 }
830 }
832 }
831 }
qml/Stages/DecoratedWindow.qml−1
@@ -110,7 +110,6 @@ FocusScope {
110 onPressedChanged: moveHandler.handlePressedChanged(pressed, pressedButtons, mouseX, mouseY)
110 onPressedChanged: moveHandler.handlePressedChanged(pressed, pressedButtons, mouseX, mouseY)
111 onPositionChanged: moveHandler.handlePositionChanged(mouse)
111 onPositionChanged: moveHandler.handlePositionChanged(mouse)
112 onReleased: {
112 onReleased: {
113− print("!!! Mouse released on decoration")
114 root.shouldCommitSnapWindow();
113 root.shouldCommitSnapWindow();
115 moveHandler.handleReleased();
114 moveHandler.handleReleased();
116 }
115 }
qml/Stages/FakeMaximizeDelegate.qml−7
@@ -42,9 +42,6 @@ Rectangle {
42 // Edge push progress
42 // Edge push progress
43 // Value range is [0.0, 1.0]
43 // Value range is [0.0, 1.0]
44 readonly property real progress: priv.directProgress != -1 ? priv.directProgress : priv.accumulatedProgress
44 readonly property real progress: priv.directProgress != -1 ? priv.directProgress : priv.accumulatedProgress
45− onProgressChanged: {
46− print("!!! Progress:", progress)
47− }
48
45
49 signal passed(int origin)
46 signal passed(int origin)
50
47
@@ -58,7 +55,6 @@ Rectangle {
58 function push(amount) {
55 function push(amount) {
59 if (accumulatedPush === EdgeBarrierSettings.pushThreshold) {
56 if (accumulatedPush === EdgeBarrierSettings.pushThreshold) {
60 // NO-OP
57 // NO-OP
61− print("!!! Accumulated push already at threshold")
62 return;
58 return;
63 }
59 }
64
60
@@ -69,7 +65,6 @@ Rectangle {
69 }
65 }
70
66
71 if (accumulatedPush === EdgeBarrierSettings.pushThreshold) {
67 if (accumulatedPush === EdgeBarrierSettings.pushThreshold) {
72− print("!!! Reached push progress 1; commit/passed")
73 passed(edge);
68 passed(edge);
74 // commit(); // NB: uncomment to have automatic maximization on 100% progress
69 // commit(); // NB: uncomment to have automatic maximization on 100% progress
75 }
70 }
@@ -103,7 +98,6 @@ Rectangle {
103
98
104 function commit() {
99 function commit() {
105 if (progress > hintThreshold && edge != -1) {
100 if (progress > hintThreshold && edge != -1) {
106− print("!!! Committing edge", edge, ", progress:", progress);
107 target.moveHandler.handlePressedChanged(false, Qt.LeftButton); // cancel the drag
101 target.moveHandler.handlePressedChanged(false, Qt.LeftButton); // cancel the drag
108 if (edge == Item.Top) {
102 if (edge == Item.Top) {
109 target.maximize();
103 target.maximize();
@@ -126,7 +120,6 @@ Rectangle {
126 }
120 }
127
121
128 function stop() {
122 function stop() {
129− print("!!! Stop")
130 priv.accumulatedPush = 0;
123 priv.accumulatedPush = 0;
131 priv.directProgress = -1;
124 priv.directProgress = -1;
132 edge = -1;
125 edge = -1;
qml/Stages/MoveHandler.qml−3
@@ -106,7 +106,6 @@ Item {
106 Mir.cursorName = "grabbing";
106 Mir.cursorName = "grabbing";
107
107
108 if (target.anyMaximized) { // restore from maximized when dragging away from edges/corners
108 if (target.anyMaximized) { // restore from maximized when dragging away from edges/corners
109− print("!!! Restoring maximized window after a drag away")
110 priv.progress = 0;
109 priv.progress = 0;
111 target.restore(false, WindowStateStorage.WindowStateNormal);
110 target.restore(false, WindowStateStorage.WindowStateNormal);
112 }
111 }
@@ -160,7 +159,6 @@ Item {
160 root.fakeMaximizeAnimationRequested(priv.progress);
159 root.fakeMaximizeAnimationRequested(priv.progress);
161 } else if (priv.nearLeftEdge || priv.nearRightEdge || priv.nearTopEdge || priv.nearTopLeftCorner || priv.nearTopRightCorner ||
160 } else if (priv.nearLeftEdge || priv.nearRightEdge || priv.nearTopEdge || priv.nearTopLeftCorner || priv.nearTopRightCorner ||
162 priv.nearBottomLeftCorner || priv.nearBottomRightCorner) {
161 priv.nearBottomLeftCorner || priv.nearBottomRightCorner) {
163− print("!!! Exited")
164 priv.progress = 0;
162 priv.progress = 0;
165 priv.resetEdges();
163 priv.resetEdges();
166 root.stopFakeAnimation();
164 root.stopFakeAnimation();
@@ -177,7 +175,6 @@ Item {
177 }
175 }
178 if ((target.state == "normal" || target.state == "restored") && priv.progress == 0) {
176 if ((target.state == "normal" || target.state == "restored") && priv.progress == 0) {
179 // save the x/y to restore to
177 // save the x/y to restore to
180− print("!!! Saving restoredX/Y")
181 target.restoredX = target.x;
178 target.restoredX = target.x;
182 target.restoredY = target.y;
179 target.restoredY = target.y;
183 }
180 }
qml/Stages/WindowControlsOverlay.qml+2−2
@@ -97,8 +97,8 @@ Item {
97 var yPoints = [];
97 var yPoints = [];
98 for (var i = 0; i < gestureArea.touchPoints.length; i++) {
98 for (var i = 0; i < gestureArea.touchPoints.length; i++) {
99 var pt = gestureArea.touchPoints[i];
99 var pt = gestureArea.touchPoints[i];
100− xPoints.push(Math.round(pt.x));
100+ xPoints.push(pt.x);
101− yPoints.push(Math.round(pt.y));
101+ yPoints.push(pt.y);
102 }
102 }
103
103
104 var leftmost = Math.min.apply(Math, xPoints);
104 var leftmost = Math.min.apply(Math, xPoints);