Merge lp:~lukas-kde/unity8/dragPanelDownToRestoreWindow into lp:unity8

Proposed by Lukáš Tinkl on 2016-03-29
Status: Superseded
Proposed branch: lp:~lukas-kde/unity8/dragPanelDownToRestoreWindow
Merge into: lp:unity8
Diff against target: 61 lines (+34/-0)
2 files modified
qml/Panel/Panel.qml (+10/-0)
tests/qmltests/tst_Shell.qml (+24/-0)
To merge this branch: bzr merge lp:~lukas-kde/unity8/dragPanelDownToRestoreWindow
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) 2016-03-29 Approve on 2016-03-31
Unity8 CI Bot continuous-integration Needs Fixing on 2016-03-30
Review via email: mp+290327@code.launchpad.net

This proposal has been superseded by a proposal from 2016-05-25.

Commit Message

With a maximized window, "dragging" the panel down should restore it

Description of the Change

With a maximized window, "dragging" the panel down should restore it

Restores a feature parity with unity 7 panel behavior

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

No

* 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?

Yes

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

https://docs.google.com/spreadsheets/d/1sauWSMvaPIoyNqkV8x5wpXvo3ZwlRJ2TjDEfmcqprVc/edit?ts=56c5ef19#gid=0

To post a comment you must log in.
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2313
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/886/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1189
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1166
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1166
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1164
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1164/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1164/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1164
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1164/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1164/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1164
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1164/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1164/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/886/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

It doesn't unmaximize if you press and hold, move over to the indicator area and then move down to the window area, maybe instead of onExited you want onMoved?

Albert Astals Cid (aacid) wrote :

review: Needs Fixing
2314. By Lukáš Tinkl on 2016-03-30

properly restore the window

taking the whole panel area into account

Lukáš Tinkl (lukas-kde) wrote :

> It doesn't unmaximize if you press and hold, move over to the indicator area
> and then move down to the window area, maybe instead of onExited you want
> onMoved?

Fixed

Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2314
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/894/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/476
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/476
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/476
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1201
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1177
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1177
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1175
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1175/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1175
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1175/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1175
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1175/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1175
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1175/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1175
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1175/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1175
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1175/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/894/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

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

 * Did CI run pass?
Yes (unrelated failures)

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

review: Approve
2315. By Lukáš Tinkl on 2016-05-02

merge trunk

2316. By Lukáš Tinkl on 2016-05-25

merge trunk

2317. By Lukáš Tinkl on 2016-05-25

unbreak restoring the window

wrt the horiz/vert maximize branch

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Panel/Panel.qml'
2--- qml/Panel/Panel.qml 2016-05-20 08:43:56 +0000
3+++ qml/Panel/Panel.qml 2016-05-25 14:31:54 +0000
4@@ -92,6 +92,7 @@
5 }
6
7 MouseArea {
8+ objectName: "windowControlArea"
9 anchors {
10 top: parent.top
11 left: parent.left
12@@ -102,6 +103,15 @@
13 onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
14 onDoubleClicked: PanelState.maximize()
15
16+ property bool mouseWasPressed: false
17+ onPressed: mouseWasPressed = containsPress
18+ onMouseYChanged: {
19+ if (mouseWasPressed && mouseY > panelHeight) {
20+ PanelState.restoreClicked(); // restore the window when "dragging" the panel down
21+ mouseWasPressed = false;
22+ }
23+ }
24+
25 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
26 // cf. https://bugreports.qt.io/browse/QTBUG-32909
27 WindowControlButtons {
28
29=== modified file 'tests/qmltests/tst_Shell.qml'
30--- tests/qmltests/tst_Shell.qml 2016-04-27 15:01:10 +0000
31+++ tests/qmltests/tst_Shell.qml 2016-05-25 14:31:54 +0000
32@@ -2427,5 +2427,29 @@
33 ApplicationManager.requestFocusApplication("calendar-app");
34 tryCompare(app2Surface, "keymap", "fr");
35 }
36+
37+ function test_dragPanelToRestoreMaximizedWindow() {
38+ loadShell("desktop");
39+ shell.usageScenario = "desktop";
40+ waitForRendering(shell);
41+ var panel = findChild(shell, "windowControlArea");
42+ verify(panel);
43+
44+ var app = ApplicationManager.startApplication("dialer-app")
45+ waitUntilAppWindowIsFullyLoaded(app);
46+
47+ // start dialer, maximize it
48+ var appContainer = findChild(shell, "appContainer");
49+ var appDelegate = findChild(appContainer, "appDelegate_dialer-app");
50+ verify(appDelegate);
51+ appDelegate.maximize();
52+ tryCompare(appDelegate, "state", "maximized");
53+
54+ mousePress(panel);
55+ mouseMove(shell, shell.width/2, shell.height/2);
56+ mouseRelease(shell);
57+
58+ tryCompare(appDelegate, "state", "normal");
59+ }
60 }
61 }

Subscribers

People subscribed via source and target branches