Merge lp:~mzanetti/unity8/fix-apps-under-panel into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 2028
Merged at revision: 2047
Proposed branch: lp:~mzanetti/unity8/fix-apps-under-panel
Merge into: lp:unity8
Prerequisite: lp:~lukas-kde/unity8/activateWindows
Diff against target: 241 lines (+97/-9)
7 files modified
qml/Components/PanelState/PanelState.qml (+2/-0)
qml/Panel/Panel.qml (+6/-0)
qml/Stages/DesktopStage.qml (+2/-0)
qml/Stages/WindowDecoration.qml (+2/-1)
qml/Stages/WindowResizeArea.qml (+7/-4)
tests/qmltests/Stages/tst_WindowResizeArea.qml (+43/-0)
tests/qmltests/tst_Shell.qml (+35/-4)
To merge this branch: bzr merge lp:~mzanetti/unity8/fix-apps-under-panel
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Abstain
PS Jenkins bot (community) continuous-integration Needs Fixing
Lukáš Tinkl (community) Approve
Review via email: mp+276283@code.launchpad.net

Commit message

prevent windows to be moved under the panel

If they happen to have a saved state which is under the panel
(might happen on alt+drag later), they will be moved below the panel
on close and reopen. This is how unity7 behaves in this regard.

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

see prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?

yes

 * Did you make sure that your branch does not contain spurious tags?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

n/a

 * If you changed the UI, has there been a design review?

n/a

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2022
http://jenkins.qa.ubuntu.com/job/unity8-ci/6609/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4949
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/24/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1321
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/24
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1216
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1217
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/23
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/23
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3973
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4946
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4946/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24754
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-mako/13/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/24
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/24/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24753

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6609/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

The top panel interaction seems to work however, when I drag the window down (offscreen), it isn't restored correctly. Slightly unrelated but still worth fixing imo

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> The top panel interaction seems to work however, when I drag the window down
> (offscreen), it isn't restored correctly. Slightly unrelated but still worth
> fixing imo

fixed and added tests

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Yup, looking good, works, tests passing

* Did you perform an exploratory manual test run of the code change and any related functionality?

Yes

* Did CI run pass? If not, please explain why.

Yes (except for broke xenial)

* Did you make sure that the branch does not contain spurious tags?

Yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2023
http://jenkins.qa.ubuntu.com/job/unity8-ci/6631/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4981
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/46/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1343
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/46
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1238
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1239
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/45
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/45
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/4000
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4978
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4978/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24822
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-mako/31/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/46
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/46/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24828

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6631/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Note: was already top approved

Text conflict in qml/Panel/Panel.qml
Text conflict in qml/Stages/DesktopStage.qml
Text conflict in qml/Stages/WindowResizeArea.qml
Text conflict in tests/qmltests/Stages/tst_DesktopStage.qml
Text conflict in tests/qmltests/Stages/tst_WindowResizeArea.qml
Text conflict in tests/qmltests/tst_Shell.qml
6 conflicts encountered.

I think some of these are from the parent branch and some own, so better to wait for the parent branch to be re-merged and then merge this one.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

I still have the merge conflicts when merging this branch to unity8 trunk (and so does CI which fails to build).

Any idea why?

2026. By Michael Zanetti

merge prereq

2027. By Michael Zanetti

fix bad merge

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> I still have the merge conflicts when merging this branch to unity8 trunk (and
> so does CI which fails to build).
>
> Any idea why?

Weird... there was some criss-cross merge which caused the prereq conflict with itself. Perhaps Lukas rewrote the history of his branch after I based mine on top of that. Anyhow, fixed now.

2028. By Michael Zanetti

fix bad merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2026
http://jenkins.qa.ubuntu.com/job/unity8-ci/6682/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5084
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/97/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1394
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/97
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1289
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1290
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/96
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/96
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/4072
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5089
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5089/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25016
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-mako/52/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/97
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/97/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25015

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6682/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2028
http://jenkins.qa.ubuntu.com/job/unity8-ci/6688/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5096
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/103/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1400
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/103
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1295
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1296
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/102/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/102/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4078
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5101
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5101/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25027
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/7/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/103
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/103/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25028

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6688/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Merged and "CI" is happy again, re-top approving as per Lukáś old approve.

review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Components/PanelState/PanelState.qml'
--- qml/Components/PanelState/PanelState.qml 2015-07-15 15:07:19 +0000
+++ qml/Components/PanelState/PanelState.qml 2015-11-09 10:53:06 +0000
@@ -23,6 +23,8 @@
23 property string title: ""23 property string title: ""
24 property bool buttonsVisible: false24 property bool buttonsVisible: false
2525
26 property int panelHeight: 0
27
26 signal close()28 signal close()
27 signal minimize()29 signal minimize()
28 signal maximize()30 signal maximize()
2931
=== modified file 'qml/Panel/Panel.qml'
--- qml/Panel/Panel.qml 2015-11-09 10:53:05 +0000
+++ qml/Panel/Panel.qml 2015-11-09 10:53:06 +0000
@@ -32,6 +32,12 @@
3232
33 opacity: fullscreenMode && indicators.fullyClosed ? 0.0 : 1.033 opacity: fullscreenMode && indicators.fullyClosed ? 0.0 : 1.0
3434
35 Binding {
36 target: PanelState
37 property: "panelHeight"
38 value: root.panelHeight
39 }
40
35 Rectangle {41 Rectangle {
36 id: darkenedArea42 id: darkenedArea
37 property real darkenedOpacity: 0.643 property real darkenedOpacity: 0.6
3844
=== modified file 'qml/Stages/DesktopStage.qml'
--- qml/Stages/DesktopStage.qml 2015-11-09 10:53:05 +0000
+++ qml/Stages/DesktopStage.qml 2015-11-09 10:53:06 +0000
@@ -391,6 +391,8 @@
391 minHeight: units.gu(10)391 minHeight: units.gu(10)
392 borderThickness: units.gu(2)392 borderThickness: units.gu(2)
393 windowId: model.appId // FIXME: Change this to point to windowId once we have such a thing393 windowId: model.appId // FIXME: Change this to point to windowId once we have such a thing
394 screenWidth: root.width
395 screenHeight: root.height
394396
395 onPressed: { ApplicationManager.focusApplication(model.appId) }397 onPressed: { ApplicationManager.focusApplication(model.appId) }
396 }398 }
397399
=== modified file 'qml/Stages/WindowDecoration.qml'
--- qml/Stages/WindowDecoration.qml 2015-11-09 10:53:05 +0000
+++ qml/Stages/WindowDecoration.qml 2015-11-09 10:53:06 +0000
@@ -18,6 +18,7 @@
18import Unity.Application 0.1 // For Mir singleton18import Unity.Application 0.1 // For Mir singleton
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import "../Components"20import "../Components"
21import "../Components/PanelState"
2122
22MouseArea {23MouseArea {
23 id: root24 id: root
@@ -56,7 +57,7 @@
56 Mir.cursorName = "grabbing";57 Mir.cursorName = "grabbing";
57 var pos = mapToItem(root.target.parent, mouseX, mouseY);58 var pos = mapToItem(root.target.parent, mouseX, mouseY);
58 root.target.x = pos.x - priv.distanceX;59 root.target.x = pos.x - priv.distanceX;
59 root.target.y = pos.y - priv.distanceY;60 root.target.y = Math.max(pos.y - priv.distanceY, PanelState.panelHeight);
60 }61 }
61 }62 }
6263
6364
=== modified file 'qml/Stages/WindowResizeArea.qml'
--- qml/Stages/WindowResizeArea.qml 2015-11-04 14:57:33 +0000
+++ qml/Stages/WindowResizeArea.qml 2015-11-09 10:53:06 +0000
@@ -18,6 +18,7 @@
18import Ubuntu.Components 1.318import Ubuntu.Components 1.3
19import Utils 0.119import Utils 0.1
20import Unity.Application 0.1 // for Mir.cursorName20import Unity.Application 0.1 // for Mir.cursorName
21import "../Components/PanelState"
2122
22MouseArea {23MouseArea {
23 id: root24 id: root
@@ -35,6 +36,8 @@
35 property int borderThickness: 036 property int borderThickness: 0
36 property int minWidth: 037 property int minWidth: 0
37 property int minHeight: 038 property int minHeight: 0
39 property int screenWidth: 0
40 property int screenHeight: 0
3841
39 QtObject {42 QtObject {
40 id: priv43 id: priv
@@ -66,10 +69,10 @@
66 Component.onCompleted: {69 Component.onCompleted: {
67 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))
68 if (windowGeometry !== undefined) {71 if (windowGeometry !== undefined) {
69 target.x = windowGeometry.x72 target.width = Math.min(windowGeometry.width, root.screenWidth)
70 target.y = windowGeometry.y73 target.height = Math.min(windowGeometry.height, root.screenHeight - PanelState.panelHeight)
71 target.width = windowGeometry.width74 target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - target.width), 0)
72 target.height = windowGeometry.height75 target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.height), PanelState.panelHeight)
73 }76 }
74 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)77 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
75 if (windowState === WindowStateStorage.WindowStateMaximized) {78 if (windowState === WindowStateStorage.WindowStateMaximized) {
7679
=== modified file 'tests/qmltests/Stages/tst_WindowResizeArea.qml'
--- tests/qmltests/Stages/tst_WindowResizeArea.qml 2015-11-04 14:57:33 +0000
+++ tests/qmltests/Stages/tst_WindowResizeArea.qml 2015-11-09 10:53:06 +0000
@@ -19,6 +19,7 @@
19import QtTest 1.019import QtTest 1.0
20import Unity.Test 0.120import Unity.Test 0.1
21import ".."21import ".."
22import "../../../qml/Components/PanelState"
22import "../../../qml/Stages"23import "../../../qml/Stages"
23import Ubuntu.Components 1.324import Ubuntu.Components 1.3
24import Ubuntu.Components.ListItems 1.3 as ListItem25import Ubuntu.Components.ListItems 1.3 as ListItem
@@ -31,6 +32,12 @@
3132
32 property var fakeWindow: windowLoader.item33 property var fakeWindow: windowLoader.item
3334
35 Binding {
36 target: PanelState
37 property: "panelHeight"
38 value: units.gu(2)
39 }
40
34 Component {41 Component {
35 id: fakeWindowComponent42 id: fakeWindowComponent
3643
@@ -57,6 +64,8 @@
57 minWidth: units.gu(15)64 minWidth: units.gu(15)
58 minHeight: units.gu(10)65 minHeight: units.gu(10)
59 windowId: "test-window-id"66 windowId: "test-window-id"
67 screenWidth: root.width
68 screenHeight: root.height
60 }69 }
6170
62 Rectangle {71 Rectangle {
@@ -228,5 +237,39 @@
228 // clean up237 // clean up
229 fakeWindow.state = "normal"238 fakeWindow.state = "normal"
230 }239 }
240
241
242 function test_restoreMovesIntoBounds_data() {
243 return [
244 {tag: "left off", x: -units.gu(5), y: units.gu(5), w: units.gu(10), h: units.gu(10)},
245 {tag: "top off", x: units.gu(5), y: -units.gu(5), w: units.gu(10), h: units.gu(10)},
246 {tag: "right off", x: root.width - units.gu(5), y: units.gu(5), w: units.gu(10), h: units.gu(10)},
247 {tag: "bottom off", x: units.gu(5), y: root.height - units.gu(5), w: units.gu(10), h: units.gu(10)},
248 {tag: "width too large", x: units.gu(5), y: units.gu(5), w: root.width * 2, h: units.gu(10)},
249 {tag: "height too large", x: units.gu(5), y: units.gu(5), w: units.gu(10), h: root.height * 2}
250 ]
251 }
252
253 function test_restoreMovesIntoBounds(data) {
254 fakeWindow.x = data.x;
255 fakeWindow.y = data.y;
256 fakeWindow.width = data.w;
257 fakeWindow.height = data.h;
258 waitForRendering(root);
259
260 // This will destroy the window and recreate it
261 windowLoader.active = false;
262 waitForRendering(root);
263 windowLoader.active = true;
264 waitForRendering(root)
265
266 // Make sure it's again where we left it in normal state before destroying
267 compare(fakeWindow.x >= 0, true)
268 compare(fakeWindow.y >= PanelState.panelHeight, true)
269 compare(fakeWindow.x + fakeWindow.width <= root.width, true)
270 compare(fakeWindow.y + fakeWindow.height <= root.height, true)
271
272 waitForRendering(root)
273 }
231 }274 }
232}275}
233276
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2015-11-04 14:58:05 +0000
+++ tests/qmltests/tst_Shell.qml 2015-11-09 10:53:06 +0000
@@ -344,9 +344,9 @@
344 var app2 = ApplicationManager.startApplication("webbrowser-app")344 var app2 = ApplicationManager.startApplication("webbrowser-app")
345 var app3 = ApplicationManager.startApplication("camera-app")345 var app3 = ApplicationManager.startApplication("camera-app")
346 var app4 = ApplicationManager.startApplication("facebook-webapp")346 var app4 = ApplicationManager.startApplication("facebook-webapp")
347 var app5 = ApplicationManager.startApplication("calendar-app")347 var app5 = ApplicationManager.startApplication("camera-app")
348 var app6 = ApplicationManager.startApplication("gallery-app")348 var app6 = ApplicationManager.startApplication("gallery-app")
349 var app7 = ApplicationManager.startApplication("camera-app")349 var app7 = ApplicationManager.startApplication("calendar-app")
350 waitUntilAppWindowIsFullyLoaded(app7);350 waitUntilAppWindowIsFullyLoaded(app7);
351 }351 }
352352
@@ -1710,11 +1710,11 @@
1710 keyPress(Qt.Key_Control)1710 keyPress(Qt.Key_Control)
1711 keyClick(Qt.Key_Tab);1711 keyClick(Qt.Key_Tab);
17121712
1713
1714 tryCompare(desktopSpread, "state", "altTab")1713 tryCompare(desktopSpread, "state", "altTab")
17151714
1716 mouseMove(shell, 0, 0);1715 mouseMove(shell, 0, shell.height / 2);
1717 tryCompare(launcher, "state", "visibleTemporary")1716 tryCompare(launcher, "state", "visibleTemporary")
1717 waitForRendering(shell)
17181718
1719 mouseClick(bfb, bfb.width / 2, bfb.height / 2)1719 mouseClick(bfb, bfb.width / 2, bfb.height / 2)
1720 tryCompare(launcher, "state", "")1720 tryCompare(launcher, "state", "")
@@ -1809,6 +1809,37 @@
1809 tryCompare(panelButtons, "visible", true);1809 tryCompare(panelButtons, "visible", true);
1810 }1810 }
18111811
1812 function test_cantMoveWindowUnderPanel() {
1813 loadDesktopShellWithApps();
1814 var appRepeater = findChild(shell, "appRepeater")
1815 var appDelegate = appRepeater.itemAt(0);
1816
1817 mousePress(appDelegate, appDelegate.width / 2, units.gu(1))
1818 mouseMove(appDelegate, appDelegate.width / 2, -units.gu(100))
1819
1820 compare(appDelegate.y >= PanelState.panelHeight, true);
1821 }
1822
1823 function test_restoreWindowStateFixesIfUnderPanel() {
1824 loadDesktopShellWithApps();
1825 var appRepeater = findChild(shell, "appRepeater")
1826 var appId = ApplicationManager.get(0).appId;
1827 var appDelegate = appRepeater.itemAt(0);
1828
1829 // Move it under the panel programmatically (might happen later with an alt+drag)
1830 appDelegate.y = -units.gu(10)
1831
1832 ApplicationManager.stopApplication(appId)
1833 ApplicationManager.startApplication(appId)
1834 waitForRendering(shell)
1835
1836 // Make sure the newly started one is at index 0 again
1837 tryCompare(ApplicationManager.get(0), "appId", appId);
1838
1839 appDelegate = appRepeater.itemAt(0);
1840 compare(appDelegate.y >= PanelState.panelHeight, true);
1841 }
1842
1812 function test_lifecyclePolicyForNonTouchApp_data() {1843 function test_lifecyclePolicyForNonTouchApp_data() {
1813 return [1844 return [
1814 {tag: "phone", formFactor: "phone", usageScenario: "phone"},1845 {tag: "phone", formFactor: "phone", usageScenario: "phone"},

Subscribers

People subscribed via source and target branches