on xenial help sign in
merge with prereq
commitd1b0f8c79ad12a0ace3171a81f44c774767d77d6 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 21 Oct 2015, 18:16 (11 years ago) parent7bced767ccad1d
5 files changed+4−22
plugins/Cursor/MousePointer.cpp+1−1 plugins/Cursor/MousePointer.h+1−1 qml/Stages/DesktopStage.qml+1 qml/Stages/WindowDecoration.qml+1−1 tests/qmltests/Stages/tst_WindowResizeArea.qml−19
plugins/Cursor/MousePointer.cpp+1−1
@@ -34,7 +34,7 @@ MousePointer::MousePointer(QQuickItem *parent)
3434{
3535}
3636
37−void MousePointer::handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButton buttons,
37+void MousePointer::handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,
3838 Qt::KeyboardModifiers modifiers)
3939{
4040 if (!parentItem()) {
plugins/Cursor/MousePointer.h+1−1
@@ -39,7 +39,7 @@ public:
3939 qreal hotspotY() const override { return m_hotspotY; }
4040
4141public Q_SLOTS:
42− void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButton buttons,
42+ void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,
4343 Qt::KeyboardModifiers modifiers) override;
4444
4545protected:
qml/Stages/DesktopStage.qml+1
@@ -242,6 +242,7 @@ Rectangle {
242242 onClose: ApplicationManager.stopApplication(model.appId)
243243 onMaximize: appDelegate.maximize()
244244 onMinimize: appDelegate.minimize()
245+ onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
245246 }
246247 }
247248 }
qml/Stages/WindowDecoration.qml+1−1
@@ -51,7 +51,7 @@ MouseArea {
5151 Mir.cursorName = "";
5252 }
5353 }
54− onMouseXChanged: {
54+ onPositionChanged: {
5555 if (priv.dragging) {
5656 var pos = mapToItem(root.target.parent, mouseX, mouseY);
5757 root.target.x = pos.x - priv.distanceX;
tests/qmltests/Stages/tst_WindowResizeArea.qml−19
@@ -150,25 +150,6 @@ Item {
150150 compare(fakeWindow.y, Math.min(initialWindowY + data.dy, initialWindowY + maxMoveY));
151151 }
152152
153− function test_saveRestorePosition() {
154− var initialWindowX = fakeWindow.x;
155− var initialWindowY = fakeWindow.y;
156−
157− var moveDelta = units.gu(5);
158−
159− fakeWindow.x = initialWindowX + moveDelta
160− fakeWindow.y = initialWindowY + moveDelta
161−
162− // This will destroy the window and recreate it
163− windowLoader.active = false;
164− waitForRendering(root);
165− windowLoader.active = true;
166−
167− // Make sure it's again where we left it before destroying
168− tryCompare(fakeWindow, "x", initialWindowX + moveDelta)
169− tryCompare(fakeWindow, "y", initialWindowX + moveDelta)
170− }
171−
172153 function test_saveRestoreSize() {
173154 var initialWindowX = fakeWindow.x;
174155 var initialWindowY = fakeWindow.y;