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

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2590
Merged at revision: 2663
Proposed branch: lp:~lukas-kde/unity8/doubleTapToMaximize
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/unified-stages
Diff against target: 77 lines (+22/-3)
3 files modified
qml/Stage/MoveHandler.qml (+2/-1)
qml/Stage/Stage.qml (+4/-2)
tests/qmltests/Stage/tst_DesktopStage.qml (+16/-0)
To merge this branch: bzr merge lp:~lukas-kde/unity8/doubleTapToMaximize
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Michael Zanetti (community) Approve
Review via email: mp+306901@code.launchpad.net

Commit message

Restore the double tap decoration to maximize feature

Description of the change

Restore the double tap decoration to maximize feature

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

yes, the prereq

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

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
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2589
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2258/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2972
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1638
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1638
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1638
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3000
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2858/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2858
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2858/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

I really dislike that MoveHandler does all this random stuff on "target" without there being any sort of defined API in between. This needs refactoring at some point.

I think we need to define a WindowDelegate component with a proper API on all the things that the MoveHandler and DecoratedWindow access. So that we can also supply mocked WindowDelegates to tests etc (DecoratedWindow tests spit an infinite amount of warnings atm).

That said, I think this fix is still OK for now.

review: Approve
2590. By Lukáš Tinkl

merge prereq

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

ok, tested it on the M10. looking ok.

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2590
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2283/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3005
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1664
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1664
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1664
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3033
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2890/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2890
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2890/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
2591. By Lukáš Tinkl

fix the fake rectangle ghost

2592. By Lukáš Tinkl

merge prereq

2593. By Lukáš Tinkl

merge prereq, fix conflicts

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Stage/MoveHandler.qml'
2--- qml/Stage/MoveHandler.qml 2016-10-06 11:13:27 +0000
3+++ qml/Stage/MoveHandler.qml 2016-10-06 11:13:28 +0000
4@@ -103,7 +103,8 @@
5 if (priv.dragging) {
6 Mir.cursorName = "grabbing";
7
8- if (target.anyMaximized) { // restore from maximized when dragging away from edges/corners
9+ // restore from maximized when dragging away from edges/corners; guard against inadvertent changes when going into maximized state
10+ if (target.anyMaximized && !target.windowedTransitionRunning) {
11 priv.progress = 0;
12 target.restore(false, WindowStateStorage.WindowStateNormal);
13 }
14
15=== modified file 'qml/Stage/Stage.qml'
16--- qml/Stage/Stage.qml 2016-10-06 11:13:27 +0000
17+++ qml/Stage/Stage.qml 2016-10-06 11:13:28 +0000
18@@ -716,6 +716,7 @@
19 readonly property string appName: model.application ? model.application.name : ""
20 property bool visuallyMaximized: false
21 property bool visuallyMinimized: false
22+ readonly property alias windowedTransitionRunning: windowedTransition.running
23
24 property int stage: ApplicationInfoInterface.MainStage
25 function saveStage(newStage) {
26@@ -1167,7 +1168,7 @@
27 }
28 },
29 State {
30- name: "maximized"; when: appDelegate.windowState == WindowStateStorage.WindowStateMaximized
31+ name: "maximized"; when: appDelegate.maximized && !appDelegate.minimized
32 PropertyChanges {
33 target: appDelegate;
34 requestedX: root.leftMargin;
35@@ -1307,7 +1308,7 @@
36 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
37 },
38 Transition {
39- from: "normal,maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight";
40+ from: "normal,restored,maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight";
41 to: "staged,stagedWithSideStage"
42 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
43 },
44@@ -1384,6 +1385,7 @@
45 }
46 },
47 Transition {
48+ id: windowedTransition
49 from: "normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
50 to: "normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
51 enabled: appDelegate.animationsEnabled
52
53=== modified file 'tests/qmltests/Stage/tst_DesktopStage.qml'
54--- tests/qmltests/Stage/tst_DesktopStage.qml 2016-10-06 11:13:27 +0000
55+++ tests/qmltests/Stage/tst_DesktopStage.qml 2016-10-06 11:13:28 +0000
56@@ -772,5 +772,21 @@
57
58 tryCompare(mouseEaterSpy, "count", 0);
59 }
60+
61+ // regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1627281
62+ function test_doubleTapToMaximizeWindow() {
63+ var dialerAppDelegate = startApplication("dialer-app");
64+ verify(dialerAppDelegate);
65+ var decoration = findChild(dialerAppDelegate, "appWindowDecoration");
66+ verify(decoration);
67+
68+ // simulate a double tap, with a slight erroneous move in between those 2 taps
69+ tap(decoration);
70+ touchPress(decoration);
71+ touchMove(decoration, decoration.width/2, decoration.height/2 - 10)
72+ touchRelease(decoration);
73+
74+ tryCompare(dialerAppDelegate, "state", "maximized");
75+ }
76 }
77 }

Subscribers

People subscribed via source and target branches