Merge lp:~unity-team/unity8/rtm-14.09-staging into lp:unity8/rtm-14.09

Proposed by Michael Zanetti
Status: Merged
Merged at revision: 1407
Proposed branch: lp:~unity-team/unity8/rtm-14.09-staging
Merge into: lp:unity8/rtm-14.09
Diff against target: 77 lines (+23/-4)
3 files modified
qml/Stages/SpreadDelegate.qml (+8/-1)
tests/mocks/Unity/Application/ApplicationManager.cpp (+7/-0)
tests/qmltests/Stages/tst_SpreadDelegate.qml (+8/-3)
To merge this branch: bzr merge lp:~unity-team/unity8/rtm-14.09-staging
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+244918@code.launchpad.net

Commit message

Backport fixes to RTM

- Bug #1368287
- Bug #1394208

To post a comment you must log in.
1419. By Andrea Cimitan

Different drag behaviour for not closable apps in spread

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Stages/SpreadDelegate.qml'
--- qml/Stages/SpreadDelegate.qml 2014-09-19 11:20:07 +0000
+++ qml/Stages/SpreadDelegate.qml 2014-12-16 22:08:28 +0000
@@ -41,10 +41,17 @@
41 Item {41 Item {
42 objectName: "appWindowWithShadow"42 objectName: "appWindowWithShadow"
4343
44 y: dragArea.distance44 readonly property real limit: root.height / 4
45
46 y: root.closeable ? dragArea.distance : elastic(dragArea.distance)
45 width: parent.width47 width: parent.width
46 height: parent.height48 height: parent.height
4749
50 function elastic(distance) {
51 var k = distance < 0 ? -limit : limit
52 return k * (1 - Math.pow((k - 1) / k, distance))
53 }
54
48 BorderImage {55 BorderImage {
49 anchors {56 anchors {
50 fill: appWindow57 fill: appWindow
5158
=== modified file 'tests/mocks/Unity/Application/ApplicationManager.cpp'
--- tests/mocks/Unity/Application/ApplicationManager.cpp 2014-09-29 09:54:30 +0000
+++ tests/mocks/Unity/Application/ApplicationManager.cpp 2014-12-16 22:08:28 +0000
@@ -20,6 +20,7 @@
20#include "ApplicationTestInterface.h"20#include "ApplicationTestInterface.h"
2121
22#include <paths.h>22#include <paths.h>
23#include <csignal>
2324
24#include <QDir>25#include <QDir>
25#include <QGuiApplication>26#include <QGuiApplication>
@@ -36,6 +37,12 @@
36{37{
37 if (!the_application_manager) {38 if (!the_application_manager) {
38 the_application_manager = new ApplicationManager();39 the_application_manager = new ApplicationManager();
40
41 // Emit signal to notify Upstart that Mir is ready to receive client connections
42 // see http://upstart.ubuntu.com/cookbook/#expect-stop
43 if (qgetenv("UNITY_MIR_EMITS_SIGSTOP") == "1") {
44 raise(SIGSTOP);
45 }
39 }46 }
40 return the_application_manager;47 return the_application_manager;
41}48}
4249
=== modified file 'tests/qmltests/Stages/tst_SpreadDelegate.qml'
--- tests/qmltests/Stages/tst_SpreadDelegate.qml 2014-08-13 19:50:09 +0000
+++ tests/qmltests/Stages/tst_SpreadDelegate.qml 2014-12-16 22:08:28 +0000
@@ -110,7 +110,7 @@
110 {tag: "swipeToClose=true closeable=true -> appWindow moves away",110 {tag: "swipeToClose=true closeable=true -> appWindow moves away",
111 swipeToClose: true, closeable: true },111 swipeToClose: true, closeable: true },
112112
113 {tag: "swipeToClose=true closeable=alse -> appWindow bounces back",113 {tag: "swipeToClose=true closeable=false -> appWindow bounces back",
114 swipeToClose: true, closeable: false },114 swipeToClose: true, closeable: false },
115115
116 {tag: "swipeToClose=false -> appWindow stays put",116 {tag: "swipeToClose=false -> appWindow stays put",
@@ -134,10 +134,15 @@
134 touchX /* fromX */, fromY, touchX /* toX */, toY,134 touchX /* fromX */, fromY, touchX /* toX */, toY,
135 true /* beginTouch */, false /* endTouch */, dragArea.minSpeedToClose * 1.1 /* speed */);135 true /* beginTouch */, false /* endTouch */, dragArea.minSpeedToClose * 1.1 /* speed */);
136136
137
138 if (data.swipeToClose) {137 if (data.swipeToClose) {
139 verify(appWindowWithShadow.y < 0);138 verify(appWindowWithShadow.y < 0);
140 verify(Math.abs(Math.abs(appWindowWithShadow.y) - dragDistance) < units.gu(1));139 if (data.closeable) {
140 // Verify that the delegate started moving exactly "threshold" after the finger movement
141 // and did not jump up to the finger, but lags the threshold behind
142 verify(Math.abs(Math.abs(appWindowWithShadow.y) - dragDistance) < units.gu(1));
143 } else {
144 verify(Math.abs(Math.abs(appWindowWithShadow.y) - dragDistance) > units.gu(1));
145 }
141146
142 touchRelease(spreadDelegateLoader.item, touchX, toY - units.gu(1));147 touchRelease(spreadDelegateLoader.item, touchX, toY - units.gu(1));
143148

Subscribers

People subscribed via source and target branches

to all changes: