Merge lp:~mzanetti/unity8/unified-stages into lp:unity8

Proposed by Michael Zanetti
Status: Superseded
Proposed branch: lp:~mzanetti/unity8/unified-stages
Merge into: lp:unity8
Prerequisite: lp:~ci-train-bot/unity8/unity8-ubuntu-yakkety-landing-078
Diff against target: 12298 lines (+3465/-6154)
62 files modified
debian/changelog (+5/-3)
debian/unity8.install (+1/-1)
plugins/Ubuntu/Gestures/TouchGate.cpp (+4/-1)
plugins/WindowManager/TopLevelSurfaceList.cpp (+0/-5)
qml/CMakeLists.txt (+1/-1)
qml/Components/EdgeBarrier.qml (+2/-0)
qml/Components/FloatingFlickable.qml (+3/-0)
qml/Greeter/LoginAreaContainer.qml (+1/-1)
qml/Notifications/Notification.qml (+1/-1)
qml/Rotation/RotationStates.qml (+0/-6)
qml/Shell.qml (+54/-167)
qml/Stage/ApplicationWindow.qml (+13/-37)
qml/Stage/DecoratedWindow.qml (+111/-31)
qml/Stage/MoveHandler.qml (+2/-2)
qml/Stage/PromptSurfaceAnimations.qml (+2/-3)
qml/Stage/Spread/BezierCurve.qml (+45/-0)
qml/Stage/Spread/KeySpline.js (+66/-0)
qml/Stage/Spread/MathUtils.js (+95/-0)
qml/Stage/Spread/OpacityMask.qml (+82/-0)
qml/Stage/Spread/Spread.qml (+162/-0)
qml/Stage/Spread/SpreadDelegateInputArea.qml (+183/-0)
qml/Stage/Spread/SpreadMaths.qml (+78/-0)
qml/Stage/Spread/StagedRightEdgeMaths.qml (+174/-0)
qml/Stage/Spread/WindowedRightEdgeMaths.qml (+81/-0)
qml/Stage/Spread/cubic-bezier.js (+39/-0)
qml/Stage/Stage.qml (+1235/-185)
qml/Stage/StageMaths.qml (+79/-0)
qml/Stage/SurfaceContainer.qml (+5/-52)
qml/Stage/TopLevelSurfaceRepeater.qml (+9/-0)
qml/Stage/WindowDecoration.qml (+1/-1)
qml/Stage/WindowInfoItem.qml (+53/-0)
qml/Stage/WindowResizeArea.qml (+33/-32)
qml/Stages/AbstractStage.qml (+0/-93)
qml/Stages/DesktopSpread.qml (+0/-576)
qml/Stages/DesktopSpreadDelegate.qml (+0/-126)
qml/Stages/PhoneStage.qml (+0/-806)
qml/Stages/SpreadDelegate.qml (+0/-424)
qml/Stages/SpreadMaths.qml (+0/-164)
qml/Stages/TabletStage.qml (+0/-1201)
qml/Stages/TransformedSpreadDelegate.qml (+0/-391)
qml/Stages/TransformedTabletSpreadDelegate.qml (+0/-437)
qml/Tutorial/TutorialRight.qml (+1/-1)
tests/mocks/Unity/Application/ApplicationInfo.cpp (+2/-2)
tests/mocks/Unity/Application/ApplicationManager.cpp (+2/-0)
tests/mocks/Unity/Application/MirSurface.cpp (+1/-0)
tests/mocks/Unity/Application/MirSurfaceItem.cpp (+13/-0)
tests/mocks/Unity/Application/MirSurfaceListModel.cpp (+0/-1)
tests/mocks/Unity/Application/VirtualKeyboard.cpp (+9/-7)
tests/mocks/Unity/Application/resources/MirSurfaceItem.qml (+2/-5)
tests/qmltests/CMakeLists.txt (+8/-8)
tests/qmltests/Stage/tst_ApplicationWindow.qml (+1/-1)
tests/qmltests/Stage/tst_DecoratedWindow.qml (+232/-0)
tests/qmltests/Stage/tst_DesktopStage.qml (+29/-71)
tests/qmltests/Stage/tst_PhoneStage.qml (+152/-219)
tests/qmltests/Stage/tst_Splash.qml (+1/-1)
tests/qmltests/Stage/tst_SurfaceContainer.qml (+2/-2)
tests/qmltests/Stage/tst_TabletStage.qml (+104/-241)
tests/qmltests/Stage/tst_WindowResizeArea.qml (+40/-36)
tests/qmltests/Stages/tst_SpreadDelegate.qml (+0/-423)
tests/qmltests/tst_OrientedShell.qml (+38/-198)
tests/qmltests/tst_Shell.qml (+199/-180)
tests/qmltests/tst_ShellWithPin.qml (+9/-11)
To merge this branch: bzr merge lp:~mzanetti/unity8/unified-stages
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Lukáš Tinkl (community) Needs Fixing
Daniel d'Andrada (community) Approve
Review via email: mp+305588@code.launchpad.net

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

Commit message

Merge all Stages into one single codebase. Apply new spread visuals.

This deletes PhoneStage, TabletStage and DesktopStage, and merges all of the functionality into Stage. Also the spread visuals have been updated by design to work with all usage modes.

Description of the change

Also, you want this in order to fix a bug if an application is rotated while suspended (this can happen now as we can rotate while in the spread with the new visuals)
https://code.launchpad.net/~mzanetti/qtmir/resize-suspended/+merge/306500

* tested on turbo, frieza and desktop
* tested/verfied by design. There will be some follow up work, especially when it comes to the tablet usage mode but design is ok with landing this as intermediate step.
* no packaging change

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2560
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2223/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2924/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2952
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2810/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2810/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2810/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2810/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2810/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2810/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2810/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2810/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2810
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2810/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

There's a debug leftover in qml/Launcher/Launcher.qml

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Likewise in qml/Notifications/NotificationMenuItemFactory.qml

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

"""
// TODO: Is this still needed? Didn't come across it. Needs checking before merging
beingResized: shell.beingResized
"""

If you solved the <FIXME-contentX> that PhoneStage and TabletStage had, there should be no use for this anymore.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

In qml/Stage/DecoratedWindow.qml:

"""
// The DecoratedWindow takes requestedWidth/requestedHeight and asks it's surface to be resized to that
"""

Typo: s/it's/its

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

As far as I remember, ApplicationWindow.fullscreen had a single purpose left: ensure that a fullscreen application, when killed by the OutOfMemory daemon, retained its size instead of switching to a normal/restored size (ie, screen size minus the status bar). In phone mode particularly. That information came from qtmir's Application.fullscreen, which retained the state from its last surface.

But that property sure is (or was) tainting the API.

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

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

In

"""
    property bool hasDecoration: true
"""

What about s/hasDecoration/decorated
Would sound more like a QML property

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

qml/Stage/Stage.qml

"""
    // Congifuration
    property string mode: "staged"
"""

Typo in comment.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

In qml/Stage/Stage.qml

"""
    // functions to be called from outside
[...]
    function closeFocusedDelegate() {
"""

Don't see closeFocusedDelegate() being called from outside. Could it be moved to the priv object? Or maybe even moved into closeFocusedShortcut as it's only used there and it's a quite small function.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

In qml/Stage/Stage.qml:

"""
        readonly property real virtualKeyboardHeight: SurfaceManager.inputMethodSurface
                                                          ? SurfaceManager.inputMethodSurface.inputBounds.height
                                                          : 0
"""

Please get it from outside. Let Shell wire it to inputMethod.visibleRect.height

"""
                    when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
                          && SurfaceManager.inputMethodSurface
                          && SurfaceManager.inputMethodSurface.state != Mir.HiddenState
                          && SurfaceManager.inputMethodSurface.state != Mir.MinimizedState
""""

Likewise, all these SurfaceManager expressions could be supplied by inputMethod.visible from Shell.qml

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

"""
                readonly property bool fullscreen: surface && surface.state === Mir.FullscreenState;
"""

If there's no surface I think you will want to fallback to application.fullscreen as I explained in a previous comment.

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

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

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

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

> In
>
> """
> property bool hasDecoration: true
> """
>
> What about s/hasDecoration/decorated
> Would sound more like a QML property

in general, yes, I'd agree. Thing here is that there are 2, hasDecoration and showDecoration. toggling hasDecoration will resize the surface, while showDecoration will temporarily hide the decoration without actually resizing the surface. naming the property just "decorated" will blur the meaning between those too much IMO.

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

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

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

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

> """
> readonly property bool fullscreen: surface && surface.state
> === Mir.FullscreenState;
> """
>
> If there's no surface I think you will want to fallback to
> application.fullscreen as I explained in a previous comment.

I investigated now a while into this. I've tried:

readonly property bool fullscreen surface ? surface.state === Mir.FullscreenState : model.application.fullscreen

but this doesn't seem to reflect the correct thing in my tests... What I could do is something like:

property bool fullscreen: false
Connections { target: surface; onStateChanged: fullscreen = surface.state === Mir.FullscreenState }

This would work as expected, although being a tad ugly. The next thing though is that the panel doesn't use this logic, instead only acts on SurfaceManager.focusedSurface and in case we focus a OOM-killed item, it will go to fale and thus showing the panel on top of the otherwise fullscreen app. Not really sure what to do atm... opinions?

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

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

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

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

Ok, I addressed all of Daniel's comments. I am falling back to application.fullscreen now, although it doesn't seem to behave as suggested by Daniel, nevertheless it shouldn't be worse than current trunk now.

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

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Switching between apps, where one supports only one orientation:
https://youtu.be/mlodwKPUdyA

review: Needs Fixing
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

qml/Stage/Stage.qml:67: TypeError: Cannot read property 'orientationChangesEnabled' of null

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

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

physical orientation is portrait while showing a landscape-only app. Go to spread and select that same app again, returning to the same state you were before:
https://youtu.be/kFr1xRCvQBU

That landscape-only app gets several resizes during that use case, going even to a portrait size in between:

MirSurface[0x29562f0,"Weathers window title"]::resize width=781 height=748
MirSurface[0x29562f0,"Weathers window title"]::resize width=440 height=748
MirSurface[0x29562f0,"Weathers window title"]::resize width=781 height=748
MirSurface[0x29562f0,"Weathers window title"]::resize width=781 height=407

Is all this really necessary to implement the new design?

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Again on phone mode:
-Launch a landscape-only app
-rotate phone to portrait
-go to switcher and select a portrait-capable app like dash

The landscape-only app is left in a portrait size.

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

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

qml/Stage/OrientationChangeAnimation.qml was used by the old SpreadDelegate to do in-delegate AppWindow rotations. Happened when, in phone mode, you switched to an app that was in a orientation different than shell's current one. It would then rotate itself to match once in foreground.

If in the new world, all applications are always matching shell orientation, then this code won't be needed anymore and should be deleted (it's already dead code in this branch).

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

In Stage.qml:

+// property int animationDuration: 4000

This can be dropped probably?

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

In tests/mocks/Unity/Application/MirSurfaceListModel.cpp:

+// connect(surface, &MirSurface::raiseRequested, this, [this, surface](){ this->raise(surface); });

Ditto

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

In DecoratedWindow.qml:

// FIXME: priv.animationDuration reaches out of context... neads cleanup before landing
Behavior on opacity { UbuntuNumberAnimation { duration: priv.animationDuration } }

$ make tryDecoratedWindow
$ file:///home/ltinkl/bzr/unity8/unified-stages/qml/Stage/DecoratedWindow.qml:149: ReferenceError: priv is not defined

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

In the same test (pressing match/animateToShellOrientation buttons)

file:///home/ltinkl/bzr/unity8/unified-stages/tests/qmltests/Stage/tst_DecoratedWindow.qml:141: TypeError: Property 'matchShellOrientation' of object DecoratedWindow_QMLTYPE_62(0x41c7c20) is not a function

file:///home/ltinkl/bzr/unity8/unified-stages/tests/qmltests/Stage/tst_DecoratedWindow.qml:145: TypeError: Property 'animateToShellOrientation' of object DecoratedWindow_QMLTYPE_62(0x41c7c20) is not a function

review: Needs Fixing
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

That's a common situation on the phone and currently it doesn't look good:
https://youtu.be/-WFEf6VEvUw

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

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

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2582
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2246/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2957
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1630
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1630/console
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1630
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2985
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2843/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2843
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2843/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Resize got worse. Specially how the surface bleeds beyond window boundaries when enlarging it (2:33).

https://youtu.be/XXa_umGuv44

Resize after unified-stages start at 1:25

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

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

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

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

> Resize got worse. Specially how the surface bleeds beyond window boundaries
> when enlarging it (2:33).
>
> https://youtu.be/XXa_umGuv44
>
> Resize after unified-stages start at 1:25

fixed. good catch, it was a stupid little mistake in wiring up things after refactoring

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

FAILED: Continuous integration, rev:2583
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2252/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2964/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2992
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2850
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2850/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2850
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2850/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2850
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2850/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2850/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2850/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2850/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2850
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2850/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2850
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2850/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2850
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2850/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2586
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2254/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2967
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1634/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2995
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2853/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2853
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2853/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Slowly push against right edge a bit then slowly move back.
It moves onto spread view smoothly but changes back abruptly and staggers in some intermediate state in-between. Same happens when you click on a window on the spread.

https://youtu.be/KqLELfZ9zyo

If it can't animate from spread state back to normal state, it should at least do a proper immediate transition without staggering in this intermediate state for a moment.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Bunch of debug leftovers in Stage.qml:

"""
onTriggered: {print("tigggggered"); priv.minimizeAllWindows()}
"""

"""
print("have delegate", appDelegate.appId)
"""

"""
print("minimizing it", appDelegate.appId)
"""

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Bunch of debug leftovers in Stage.qml:
>
> """
> onTriggered: {print("tigggggered"); priv.minimizeAllWindows()}
> """
>
> """
> print("have delegate", appDelegate.appId)
> """
>
> """
> print("minimizing it", appDelegate.appId)
> """

fixed

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

> That's a common situation on the phone and currently it doesn't look good:
> https://youtu.be/-WFEf6VEvUw

OK. I have improved this according to design's guidance. We're not 100% happy with it yet, but at least it doesn't look broken any more.

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

> Slowly push against right edge a bit then slowly move back.
> It moves onto spread view smoothly but changes back abruptly and staggers in
> some intermediate state in-between. Same happens when you click on a window on
> the spread.
>
> https://youtu.be/KqLELfZ9zyo
>
> If it can't animate from spread state back to normal state, it should at least
> do a proper immediate transition without staggering in this intermediate state
> for a moment.

fixed...

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

Okay... I think I fixed all of the comments here, except the difference between trunk and this branch in regard to the orientation of the apps *in* the spread. That, however, is really what design wants and we are aware that there's room for improvement on how it looks/behaves and we will iterate on things. I'd prefer to keep logic around the not implemented rotation related functions for now, and then drop them when we reached the final conclusion on the spread & rotation with design.

So, unless you guys find some serious bugs, or something in the code that really needs fixing/cleaning up, I would vote for bringing this branch to an end now to unblock people working on top of this and iterate afterwards.

Daniel, Lukas, wdyt?

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

> So, unless you guys find some serious bugs, [...] I would vote for bringing this branch to an
> end now [...] and iterate afterwards.
>
> Daniel, Lukas, wdyt?

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/2261/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2982
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1645
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1645
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1645
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3010
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2868/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2868
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2868/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

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

This test is still failing, even locally, needs fixing:

FAIL! : qmltestrunner::PhoneStage::test_enterSpread(>breakPoint (trigger)) property focusedApplicationId
   Actual (): facebook-webapp
   Expected ():
   Loc: [/home/ltinkl/bzr/unity8/unified-stages/tests/qmltests/Stage/tst_PhoneStage.qml(229)]

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

On 28.09.2016 21:31, Lukáš Tinkl wrote:
> Review: Needs Fixing
>
> This test is still failing, even locally, needs fixing:
>
> FAIL! : qmltestrunner::PhoneStage::test_enterSpread(>breakPoint (trigger)) property focusedApplicationId
> Actual (): facebook-webapp
> Expected ():
> Loc: [/home/ltinkl/bzr/unity8/unified-stages/tests/qmltests/Stage/tst_PhoneStage.qml(229)]
>
>

Fixed

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

Waiting for CI for the top approval, but this should be good enough now. Thanks!

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

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

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

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

Found a small issue while testing this in the silo:

In desktop mode, newly launched apps are correctly focused but never raised (brought to the top), regardless of whether started from launcher, dash or indicators

review: Needs Fixing
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

review: Needs Fixing (continuous-integration)
lp:~mzanetti/unity8/unified-stages updated
2596. By Michael Zanetti

revert the change that broke the camera app

2597. By Michael Zanetti

fix focusing in windowed mode

2598. By Michael Zanetti

hide close button when the tile is displaced

2599. By Michael Zanetti

merge trunk

2600. By Michael Zanetti

revert changes in changelog

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

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

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

review: Needs Fixing (continuous-integration)
lp:~mzanetti/unity8/unified-stages updated
2601. By Michael Zanetti

fix ghost rect on corner maximize

2602. By Michael Zanetti

fix OSK rect not always going away when it should

2603. By Michael Zanetti

fix test flakiness

2604. By Michael Zanetti

fix spread close input area

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-10-04 15:02:29 +0000
3+++ debian/changelog 2016-10-05 14:03:04 +0000
4@@ -7,7 +7,7 @@
5
6 -- Michael Terry <mterry@ubuntu.com> Mon, 03 Oct 2016 10:43:25 -0400
7
8-unity8 (8.14+16.10.20160922-0ubuntu1) yakkety; urgency=medium
9+unity8 (8.14+16.10.20160914-0ubuntu1) yakkety; urgency=medium
10
11 [ Albert Astals Cid ]
12 * LVWPH: update clipItem height when list height changes (LP:
13@@ -55,12 +55,14 @@
14 the greeter.
15
16 [ Lukáš Tinkl ]
17- * Implement edge maximizing (aka window snapping) (LP: #1602628)
18 * On the PC platform (as opposed to running on $devices), use the
19 "mute" action instead of silent mode
20 * Respect Fitt's law wrt the window control buttons in panel (LP:
21 #1611959)
22 * Fix 2 failing color-related tests
23+ * Implement edge maximizing (aka window snapping) (LP: #1602628,
24+ #1611859)
25+ * Implement moving windows by Alt + left mouse button
26
27 [ Marco Trevisan (Treviño) ]
28 * Indicators, mocks: add fake indicators menuitem to populate mocks
29@@ -82,7 +84,7 @@
30 * Update look of infographic a bit
31 * Make infographic bubbles white even on the default wallpaper.
32
33- -- Michał Sawicz <michal.sawicz@canonical.com> Thu, 22 Sep 2016 07:46:57 +0000
34+ -- Michał Sawicz <michal.sawicz@canonical.com> Wed, 14 Sep 2016 00:46:45 +0000
35
36 unity8 (8.14+16.10.20160831.3-0ubuntu1) yakkety; urgency=medium
37
38
39=== modified file 'debian/unity8.install'
40--- debian/unity8.install 2016-06-20 22:42:46 +0000
41+++ debian/unity8.install 2016-10-05 14:03:04 +0000
42@@ -16,7 +16,7 @@
43 usr/share/unity8/OrientedShell.qml
44 usr/share/unity8/DisabledScreenNotice.qml
45 usr/share/unity8/Shell.qml
46-usr/share/unity8/Stages
47+usr/share/unity8/Stage
48 usr/share/unity8/Tutorial
49 usr/share/unity8/Wizard
50 usr/share/url-dispatcher/urls/unity8-dash.url-dispatcher
51
52=== modified file 'plugins/Ubuntu/Gestures/TouchGate.cpp'
53--- plugins/Ubuntu/Gestures/TouchGate.cpp 2016-07-13 07:29:00 +0000
54+++ plugins/Ubuntu/Gestures/TouchGate.cpp 2016-10-05 14:03:04 +0000
55@@ -61,7 +61,10 @@
56 const QTouchEvent::TouchPoint &touchPoint = touchPoints[i];
57
58 if (touchPoint.state() == Qt::TouchPointPressed) {
59- Q_ASSERT(!m_touchInfoMap.contains(touchPoint.id()));
60+// FIXME: This assert triggers frequently in make trySomething. We have verified
61+// that it's a bug in the mouse to touch conversion of the test environment
62+// and not in the actual product. Still, it probably should be cleaned up eventually.
63+// Q_ASSERT(!m_touchInfoMap.contains(touchPoint.id()));
64 m_touchInfoMap[touchPoint.id()].ownership = OwnershipRequested;
65 m_touchInfoMap[touchPoint.id()].ended = false;
66 TouchRegistry::instance()->requestTouchOwnership(touchPoint.id(), this);
67
68=== modified file 'plugins/WindowManager/TopLevelSurfaceList.cpp'
69--- plugins/WindowManager/TopLevelSurfaceList.cpp 2016-04-04 13:43:41 +0000
70+++ plugins/WindowManager/TopLevelSurfaceList.cpp 2016-10-05 14:03:04 +0000
71@@ -133,11 +133,6 @@
72
73 void TopLevelSurfaceList::connectSurface(MirSurfaceInterface *surface)
74 {
75- connect(surface, &MirSurfaceInterface::focusedChanged, this, [this, surface](bool focused){
76- if (focused) {
77- this->raise(surface);
78- }
79- });
80 connect(surface, &MirSurfaceInterface::liveChanged, this, [this, surface](bool live){
81 if (!live) {
82 onSurfaceDied(surface);
83
84=== modified file 'qml/CMakeLists.txt'
85--- qml/CMakeLists.txt 2015-03-06 04:44:11 +0000
86+++ qml/CMakeLists.txt 2016-10-05 14:03:04 +0000
87@@ -12,7 +12,7 @@
88 Launcher
89 Notifications
90 Panel
91- Stages
92+ Stage
93 Rotation
94 Tutorial
95 Wizard
96
97=== modified file 'qml/Components/EdgeBarrier.qml'
98--- qml/Components/EdgeBarrier.qml 2016-02-15 16:43:56 +0000
99+++ qml/Components/EdgeBarrier.qml 2016-10-05 14:03:04 +0000
100@@ -29,6 +29,8 @@
101 // Supported values are: Qt.LeftEdge, Qt.RightEdge
102 property int edge: Qt.LeftEdge
103
104+ readonly property alias progress: controller.progress
105+
106 property Item target: parent
107 function push(amount) { controller.push(amount); }
108 signal passed()
109
110=== modified file 'qml/Components/FloatingFlickable.qml'
111--- qml/Components/FloatingFlickable.qml 2016-08-08 10:41:38 +0000
112+++ qml/Components/FloatingFlickable.qml 2016-10-05 14:03:04 +0000
113@@ -35,6 +35,9 @@
114 property alias contentX: flickable.contentX
115 property alias contentY: flickable.contentY
116 property alias direction: swipeArea.direction
117+ property alias leftMargin: flickable.leftMargin
118+ property alias rightMargin: flickable.rightMargin
119+ property alias dragging: flickable.dragging
120
121 MouseEventGenerator {
122 id: mouseEventGenerator
123
124=== modified file 'qml/Greeter/LoginAreaContainer.qml'
125--- qml/Greeter/LoginAreaContainer.qml 2016-06-14 17:34:35 +0000
126+++ qml/Greeter/LoginAreaContainer.qml 2016-10-05 14:03:04 +0000
127@@ -26,7 +26,7 @@
128 rightMargin: -units.gu(1.5)
129 bottomMargin: -units.gu(1.5)
130 }
131- source: "../Stages/graphics/dropshadow2gu.sci"
132+ source: "../graphics/dropshadow2gu.sci"
133 opacity: 0.35
134 }
135
136
137=== modified file 'qml/Notifications/Notification.qml'
138--- qml/Notifications/Notification.qml 2016-08-19 13:27:05 +0000
139+++ qml/Notifications/Notification.qml 2016-10-05 14:03:04 +0000
140@@ -143,7 +143,7 @@
141 fill: contents
142 margins: shapedBack.visible ? -units.gu(1) : -units.gu(1.5)
143 }
144- source: "../Stages/graphics/dropshadow2gu.sci"
145+ source: "../graphics/dropshadow2gu.sci"
146 opacity: notification.opacity * 0.5
147 enabled: !fullscreen
148 }
149
150=== modified file 'qml/Rotation/RotationStates.qml'
151--- qml/Rotation/RotationStates.qml 2016-04-29 12:52:53 +0000
152+++ qml/Rotation/RotationStates.qml 2016-10-05 14:03:04 +0000
153@@ -121,12 +121,6 @@
154 }
155 }
156
157- property var shellBeingResized: Binding {
158- target: root.shell
159- property: "beingResized"
160- value: d.transitioning
161- }
162-
163 readonly property int fullAnimation: 0
164 readonly property int indicatorsBarAnimation: 1
165 readonly property int noAnimation: 2
166
167=== modified file 'qml/Shell.qml'
168--- qml/Shell.qml 2016-09-22 07:42:01 +0000
169+++ qml/Shell.qml 2016-10-05 14:03:04 +0000
170@@ -35,7 +35,7 @@
171 import "Panel"
172 import "Components"
173 import "Notifications"
174-import "Stages"
175+import "Stage"
176 import "Tutorial"
177 import "Wizard"
178 import Unity.Notifications 1.0 as NotificationBackend
179@@ -58,24 +58,22 @@
180 property real nativeWidth
181 property real nativeHeight
182 property alias indicatorAreaShowProgress: panel.indicatorAreaShowProgress
183- property bool beingResized
184 property string usageScenario: "phone" // supported values: "phone", "tablet" or "desktop"
185 property string mode: "full-greeter"
186 property alias oskEnabled: inputMethod.enabled
187 function updateFocusedAppOrientation() {
188- applicationsDisplayLoader.item.updateFocusedAppOrientation();
189+ stage.updateFocusedAppOrientation();
190 }
191 function updateFocusedAppOrientationAnimated() {
192- applicationsDisplayLoader.item.updateFocusedAppOrientationAnimated();
193+ stage.updateFocusedAppOrientationAnimated();
194 }
195 property bool hasMouse: false
196
197 // to be read from outside
198- readonly property int mainAppWindowOrientationAngle:
199- applicationsDisplayLoader.item ? applicationsDisplayLoader.item.mainAppWindowOrientationAngle : 0
200+ readonly property int mainAppWindowOrientationAngle: stage.mainAppWindowOrientationAngle
201
202 readonly property bool orientationChangesEnabled: panel.indicators.fullyClosed
203- && (applicationsDisplayLoader.item && applicationsDisplayLoader.item.orientationChangesEnabled)
204+ && stage.orientationChangesEnabled
205 && (!greeter || !greeter.animating)
206
207 readonly property bool showingGreeter: greeter && greeter.shown
208@@ -89,19 +87,13 @@
209 return Qt.PrimaryOrientation;
210 } else if (showingGreeter || notifications.topmostIsFullscreen) {
211 return Qt.PrimaryOrientation;
212- } else if (applicationsDisplayLoader.item) {
213- return shell.orientations.map(applicationsDisplayLoader.item.supportedOrientations);
214 } else {
215- // we just don't care
216- return Qt.PortraitOrientation
217- | Qt.LandscapeOrientation
218- | Qt.InvertedPortraitOrientation
219- | Qt.InvertedLandscapeOrientation;
220+ return shell.orientations.map(stage.supportedOrientations);
221 }
222 }
223
224- readonly property var mainApp:
225- applicationsDisplayLoader.item ? applicationsDisplayLoader.item.mainApp : null
226+ readonly property var mainApp: stage.mainApp
227+
228 onMainAppChanged: {
229 if (mainApp) {
230 _onMainAppChanged(mainApp.appId);
231@@ -278,154 +270,50 @@
232 applicationsModel: ApplicationManager
233 }
234
235- Loader {
236- id: applicationsDisplayLoader
237- objectName: "applicationsDisplayLoader"
238+ Stage {
239+ id: stage
240+ objectName: "stage"
241 anchors.fill: parent
242-
243- // When we have a locked app, we only want to show that one app.
244- // FIXME: do this in a less traumatic way. We currently only allow
245- // locked apps in phone mode (see FIXME in Lockscreen component in
246- // this same file). When that changes, we need to do something
247- // nicer here. But this code is currently just to prevent a
248- // theoretical attack where user enters lockedApp mode, then makes
249- // the screen larger (maybe connects to monitor) and tries to enter
250- // tablet mode.
251+ focus: true
252+
253+ dragAreaWidth: shell.edgeSize
254+ background: wallpaperResolver.background
255+ leftEdgeDragProgress: !greeter || greeter.locked || !tutorial.launcherLongSwipeEnabled ? 0 :
256+ Math.max(0, (launcher.dragDistance * (stage.width - launcher.panelWidth) / stage.width) - launcher.panelWidth)
257+
258+ applicationManager: ApplicationManager
259+ topLevelSurfaceList: topLevelSurfaceList
260+ inputMethodRect: inputMethod.visibleRect
261
262 property string usageScenario: shell.usageScenario === "phone" || greeter.hasLockedApp
263- ? "phone"
264- : shell.usageScenario
265- readonly property string qmlComponent: {
266- if (applicationsDisplayLoader.usageScenario === "phone") {
267- return "Stages/PhoneStage.qml";
268- } else if (applicationsDisplayLoader.usageScenario === "tablet") {
269- return "Stages/TabletStage.qml";
270- } else {
271- return "Stages/DesktopStage.qml";
272- }
273- }
274- // TODO: Ensure the current stage is destroyed before the new one gets loaded.
275- // Currently the new one will get loaded while the old is still hanging
276- // around for a bit, which might lead to conflicts where both stages
277- // change the model simultaneously.
278- onQmlComponentChanged: {
279- if (item) item.stageAboutToBeUnloaded();
280- source = qmlComponent;
281- }
282-
283- property bool interactive: (!greeter || !greeter.shown)
284+ ? "phone"
285+ : shell.usageScenario
286+
287+ mode: usageScenario == "phone" ? "staged"
288+ : usageScenario == "tablet" ? "stagedWithSideStage"
289+ : "windowed"
290+
291+ shellOrientation: shell.orientation
292+ shellOrientationAngle: shell.orientationAngle
293+ orientations: shell.orientations
294+ nativeWidth: shell.nativeWidth
295+ nativeHeight: shell.nativeHeight
296+
297+ interactive: (!greeter || !greeter.shown)
298 && panel.indicators.fullyClosed
299 && launcher.progress == 0
300 && !notifications.useModal
301
302 onInteractiveChanged: { if (interactive) { focus = true; } }
303
304- Binding {
305- target: applicationsDisplayLoader.item
306- property: "focus"
307- value: true
308- }
309- Binding {
310- target: applicationsDisplayLoader.item
311- property: "objectName"
312- value: "stage"
313- }
314- Binding {
315- target: applicationsDisplayLoader.item
316- property: "dragAreaWidth"
317- value: shell.edgeSize
318- }
319- Binding {
320- target: applicationsDisplayLoader.item
321- property: "maximizedAppTopMargin"
322- // Not just using panel.panelHeight as that changes depending on the focused app.
323- value: panel.indicators.minimizedPanelHeight
324- }
325- Binding {
326- target: applicationsDisplayLoader.item
327- property: "interactive"
328- value: applicationsDisplayLoader.interactive
329- }
330- Binding {
331- target: applicationsDisplayLoader.item
332- property: "spreadEnabled"
333- value: tutorial.spreadEnabled && (!greeter || (!greeter.hasLockedApp && !greeter.shown))
334- }
335- Binding {
336- target: applicationsDisplayLoader.item
337- property: "inverseProgress"
338- value: !greeter || greeter.locked || !tutorial.launcherLongSwipeEnabled ? 0 : launcher.progress
339- }
340- Binding {
341- target: applicationsDisplayLoader.item
342- property: "shellOrientationAngle"
343- value: shell.orientationAngle
344- }
345- Binding {
346- target: applicationsDisplayLoader.item
347- property: "shellOrientation"
348- value: shell.orientation
349- }
350- Binding {
351- target: applicationsDisplayLoader.item
352- property: "orientations"
353- value: shell.orientations
354- }
355- Binding {
356- target: applicationsDisplayLoader.item
357- property: "background"
358- value: wallpaperResolver.cachedBackground
359- }
360- Binding {
361- target: applicationsDisplayLoader.item
362- property: "nativeWidth"
363- value: shell.nativeWidth
364- }
365- Binding {
366- target: applicationsDisplayLoader.item
367- property: "nativeHeight"
368- value: shell.nativeHeight
369- }
370- Binding {
371- target: applicationsDisplayLoader.item
372- property: "beingResized"
373- value: shell.beingResized
374- }
375- Binding {
376- target: applicationsDisplayLoader.item
377- property: "keepDashRunning"
378- value: launcher.shown || launcher.dashSwipe
379- }
380- Binding {
381- target: applicationsDisplayLoader.item
382- property: "suspended"
383- value: greeter.shown
384- }
385- Binding {
386- target: applicationsDisplayLoader.item
387- property: "altTabPressed"
388- value: physicalKeysMapper.altTabPressed
389- }
390- Binding {
391- target: applicationsDisplayLoader.item
392- property: "leftMargin"
393- value: shell.usageScenario == "desktop" && !settings.autohideLauncher ? launcher.panelWidth: 0
394- }
395- Binding {
396- target: applicationsDisplayLoader.item
397- property: "applicationManager"
398- value: ApplicationManager
399- }
400- Binding {
401- target: applicationsDisplayLoader.item
402- property: "topLevelSurfaceList"
403- value: topLevelSurfaceList
404- }
405- Binding {
406- target: applicationsDisplayLoader.item
407- property: "oskEnabled"
408- value: shell.oskEnabled
409- }
410+ leftMargin: shell.usageScenario == "desktop" && !settings.autohideLauncher ? launcher.panelWidth: 0
411+ suspended: greeter.shown
412+ keepDashRunning: launcher.shown || launcher.dashSwipe
413+ altTabPressed: physicalKeysMapper.altTabPressed
414+ oskEnabled: shell.oskEnabled
415+
416+ // TODO: This is not implemented yet in the new stage...
417+ spreadEnabled: tutorial.spreadEnabled && (!greeter || (!greeter.hasLockedApp && !greeter.shown))
418 }
419 }
420
421@@ -442,6 +330,7 @@
422
423 Loader {
424 id: greeterLoader
425+ objectName: "greeterLoader"
426 anchors.fill: parent
427 anchors.topMargin: panel.panelHeight
428 sourceComponent: shell.mode != "shell" ? integratedGreeter :
429@@ -650,7 +539,7 @@
430 }
431 onFocusChanged: {
432 if (!focus) {
433- applicationsDisplayLoader.focus = true;
434+ stage.focus = true;
435 }
436 }
437
438@@ -706,12 +595,12 @@
439 delayed: dialogs.hasActiveDialog || notifications.hasNotification ||
440 inputMethod.visible ||
441 (launcher.shown && !launcher.lockedVisible) ||
442- panel.indicators.shown || stage.dragProgress > 0
443+ panel.indicators.shown || stage.rightEdgeDragProgress > 0
444 usageScenario: shell.usageScenario
445 lastInputTimestamp: inputFilter.lastInputTimestamp
446 launcher: launcher
447 panel: panel
448- stage: applicationsDisplayLoader.item
449+ stage: stage
450 }
451
452 Wizard {
453@@ -802,7 +691,7 @@
454 z: dialogs.z + 10
455 GlobalShortcut { shortcut: Qt.Key_Print; onTriggered: itemGrabber.capture(shell) }
456 Connections {
457- target: applicationsDisplayLoader.item
458+ target: stage
459 ignoreUnknownSignals: true
460 onItemSnapshotRequested: itemGrabber.capture(item)
461 }
462@@ -814,7 +703,7 @@
463 z: itemGrabber.z + 1
464 topBoundaryOffset: panel.panelHeight
465
466- confiningItem: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.itemConfiningMouseCursor : null
467+ confiningItem: stage.itemConfiningMouseCursor
468
469 property bool mouseNeverMoved: true
470 Binding {
471@@ -828,10 +717,9 @@
472
473 height: units.gu(3)
474
475- readonly property var previewRectangle: applicationsDisplayLoader.item && applicationsDisplayLoader.item.previewRectangle &&
476- applicationsDisplayLoader.item.previewRectangle.target &&
477- applicationsDisplayLoader.item.previewRectangle.target.dragging ?
478- applicationsDisplayLoader.item.previewRectangle : null
479+ readonly property var previewRectangle: stage.previewRectangle.target &&
480+ stage.previewRectangle.target.dragging ?
481+ stage.previewRectangle : null
482
483 onPushedLeftBoundary: {
484 if (buttons === Qt.NoButton) {
485@@ -842,9 +730,8 @@
486 }
487
488 onPushedRightBoundary: {
489- if (buttons === Qt.NoButton && applicationsDisplayLoader.item
490- && applicationsDisplayLoader.item.pushRightEdge) {
491- applicationsDisplayLoader.item.pushRightEdge(amount);
492+ if (buttons === Qt.NoButton) {
493+ stage.pushRightEdge(amount);
494 } else if (buttons === Qt.LeftButton && previewRectangle && previewRectangle.target.canBeMaximizedLeftRight) {
495 previewRectangle.maximizeRight(amount);
496 }
497
498=== renamed directory 'qml/Stages' => 'qml/Stage'
499=== modified file 'qml/Stage/ApplicationWindow.qml'
500--- qml/Stages/ApplicationWindow.qml 2016-08-08 11:18:19 +0000
501+++ qml/Stage/ApplicationWindow.qml 2016-10-05 14:03:04 +0000
502@@ -20,8 +20,8 @@
503
504 FocusScope {
505 id: root
506- implicitWidth: surfaceContainer.implicitWidth
507- implicitHeight: surfaceContainer.implicitHeight
508+ implicitWidth: requestedWidth
509+ implicitHeight: requestedHeight
510
511 // to be read from outside
512 property alias interactive: surfaceContainer.interactive
513@@ -29,22 +29,10 @@
514 readonly property string title: surface && surface.name !== "" ? surface.name : d.name
515 readonly property QtObject focusedSurface: d.focusedSurface.surface
516
517- // overridable from outside
518- property bool fullscreen: {
519- if (surface) {
520- return surface.state === Mir.FullscreenState;
521- } else if (application) {
522- return application.fullscreen;
523- } else {
524- return false;
525- }
526- }
527-
528 // to be set from outside
529 property QtObject surface
530 property QtObject application
531 property int surfaceOrientationAngle
532- property alias resizeSurface: surfaceContainer.resizeSurface
533 property int requestedWidth: -1
534 property int requestedHeight: -1
535 property real splashRotation: 0
536@@ -156,6 +144,9 @@
537 id: screenshotImage
538 objectName: "screenshotImage"
539 anchors.fill: parent
540+ fillMode: Image.PreserveAspectCrop
541+ horizontalAlignment: Image.AlignLeft
542+ verticalAlignment: Image.AlignTop
543 antialiasing: !root.interactive
544 z: 1
545
546@@ -197,6 +188,7 @@
547
548 SurfaceContainer {
549 id: surfaceContainer
550+ anchors.fill: parent
551 z: splashLoader.z + 1
552 requestedWidth: root.requestedWidth
553 requestedHeight: root.requestedHeight
554@@ -220,6 +212,8 @@
555 surface: model.surface
556 width: root.width
557 height: root.height
558+ requestedWidth: root.requestedWidth
559+ requestedHeight: root.requestedHeight
560 isPromptSurface: true
561 z: surfaceContainer.z + (promptSurfacesRepeater.count - index)
562 property int index: model.index
563@@ -239,28 +233,6 @@
564 property Item first: null
565 }
566
567- // SurfaceContainer size drives ApplicationWindow size
568- Binding {
569- target: root; property: "width"
570- value: stateGroup.state === "surface" ? surfaceContainer.width : root.requestedWidth
571- when: root.requestedWidth >= 0
572- }
573- Binding {
574- target: root; property: "height"
575- value: stateGroup.state === "surface" ? surfaceContainer.height : root.requestedHeight
576- when: root.requestedHeight >= 0
577- }
578-
579- // ApplicationWindow size drives SurfaceContainer size
580- Binding {
581- target: surfaceContainer; property: "width"; value: root.width
582- when: root.requestedWidth < 0
583- }
584- Binding {
585- target: surfaceContainer; property: "height"; value: root.height
586- when: root.requestedHeight < 0
587- }
588-
589 StateGroup {
590 id: stateGroup
591 objectName: "applicationWindowStateGroup"
592@@ -287,6 +259,11 @@
593 (d.liveSurface ||
594 (d.applicationState !== ApplicationInfoInterface.Running
595 && screenshotImage.status !== Image.Ready))
596+ PropertyChanges {
597+ target: root
598+ implicitWidth: surfaceContainer.implicitWidth
599+ implicitHeight: surfaceContainer.implicitHeight
600+ }
601 },
602 State {
603 name: "screenshot"
604@@ -424,5 +401,4 @@
605 }
606 ]
607 }
608-
609 }
610
611=== modified file 'qml/Stage/DecoratedWindow.qml'
612--- qml/Stages/DecoratedWindow.qml 2016-09-08 14:13:27 +0000
613+++ qml/Stage/DecoratedWindow.qml 2016-10-05 14:03:04 +0000
614@@ -17,34 +17,46 @@
615 import QtQuick 2.4
616 import Ubuntu.Components 1.3
617 import Unity.Application 0.1
618+import "Spread/MathUtils.js" as MathUtils
619
620 FocusScope {
621 id: root
622
623- width: !counterRotate ? applicationWindow.width : applicationWindow.height
624- height: visibleDecorationHeight + (!counterRotate ? applicationWindow.height : applicationWindow.width)
625+ // The DecoratedWindow takes requestedWidth/requestedHeight and asks its surface to be resized to that
626+ // (minus the window decoration size in case hasDecoration and showDecoration are true)
627+ // The surface might not be able to resize to the requested values. It will return its actual size
628+ // in implicitWidth/implicitHeight.
629
630 property alias application: applicationWindow.application
631 property alias surface: applicationWindow.surface
632 readonly property alias focusedSurface: applicationWindow.focusedSurface
633 property alias active: decoration.active
634 readonly property alias title: applicationWindow.title
635- property alias fullscreen: applicationWindow.fullscreen
636 property alias maximizeButtonShown: decoration.maximizeButtonShown
637+ property alias interactive: applicationWindow.interactive
638+ readonly property alias orientationChangesEnabled: applicationWindow.orientationChangesEnabled
639
640- readonly property bool decorationShown: !fullscreen
641- property bool highlightShown: false
642- property real shadowOpacity: 1
643+ // Changing this will actually add/remove a decoration, meaning, requestedHeight will take the decoration into account.
644+ property bool hasDecoration: true
645+ // This will temporarily show/hide the decoration without actually changing the surface's dimensions
646+ property real showDecoration: 1
647+ property bool animateDecoration: false
648+ property bool showHighlight: false
649+ property int highlightSize: units.gu(1)
650+ property real shadowOpacity: 0
651+ property bool darkening: false
652
653 property real requestedWidth
654 property real requestedHeight
655+ property real scaleToPreviewProgress: 0
656+ property int scaleToPreviewSize: units.gu(30)
657
658 property alias surfaceOrientationAngle: applicationWindow.surfaceOrientationAngle
659- readonly property real visibleDecorationHeight: root.decorationShown ? decoration.height : 0
660+ readonly property real decorationHeight: Math.min(d.visibleDecorationHeight, d.requestedDecorationHeight)
661 readonly property bool counterRotate: surfaceOrientationAngle != 0 && surfaceOrientationAngle != 180
662
663 readonly property int minimumWidth: !counterRotate ? applicationWindow.minimumWidth : applicationWindow.minimumHeight
664- readonly property int minimumHeight: visibleDecorationHeight + (!counterRotate ? applicationWindow.minimumHeight : applicationWindow.minimumWidth)
665+ readonly property int minimumHeight: decorationHeight + (!counterRotate ? applicationWindow.minimumHeight : applicationWindow.minimumWidth)
666 readonly property int maximumWidth: !counterRotate ? applicationWindow.maximumWidth : applicationWindow.maximumHeight
667 readonly property int maximumHeight: (root.decorationShown && applicationWindow.maximumHeight > 0 ? decoration.height : 0)
668 + (!counterRotate ? applicationWindow.maximumHeight : applicationWindow.maximumWidth)
669@@ -66,40 +78,86 @@
670 signal decorationPressed()
671 signal decorationReleased()
672
673+ QtObject {
674+ id: d
675+ property int requestedDecorationHeight: root.hasDecoration ? decoration.height : 0
676+ Behavior on requestedDecorationHeight { enabled: root.animateDecoration; UbuntuNumberAnimation { } }
677+
678+ property int visibleDecorationHeight: root.hasDecoration ? root.showDecoration * decoration.height : 0
679+ Behavior on visibleDecorationHeight { enabled: root.animateDecoration; UbuntuNumberAnimation { } }
680+ }
681+
682+ StateGroup {
683+ states: [
684+ State {
685+ name: "normal"; when: root.scaleToPreviewProgress <= 0 && root.application.state === ApplicationInfoInterface.Running
686+ PropertyChanges {
687+ target: root
688+ implicitWidth: counterRotate ? applicationWindow.implicitHeight : applicationWindow.implicitWidth
689+ implicitHeight: root.decorationHeight + (counterRotate ? applicationWindow.implicitWidth: applicationWindow.implicitHeight)
690+ }
691+ },
692+ State {
693+ name: "normalSuspended"; when: root.scaleToPreviewProgress <= 0 && root.application.state !== ApplicationInfoInterface.Running
694+ extend: "normal"
695+ PropertyChanges {
696+ target: root
697+ implicitWidth: counterRotate ? applicationWindow.requestedHeight : applicationWindow.requestedWidth
698+ implicitHeight: root.decorationHeight + (counterRotate ? applicationWindow.requestedWidth: applicationWindow.requestedHeight)
699+ }
700+ },
701+ State {
702+ name: "preview"; when: root.scaleToPreviewProgress > 0
703+ PropertyChanges {
704+ target: root
705+ implicitWidth: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, root.scaleToPreviewSize, root.scaleToPreviewProgress)
706+ implicitHeight: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, root.scaleToPreviewSize, root.scaleToPreviewProgress)
707+ }
708+ PropertyChanges {
709+ target: applicationWindow;
710+ requestedWidth: applicationWindow.oldRequestedWidth
711+ requestedHeight: applicationWindow.oldRequestedHeight
712+ width: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, applicationWindow.minSize, root.scaleToPreviewProgress)
713+ height: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, applicationWindow.minSize, root.scaleToPreviewProgress)
714+ itemScale: root.implicitWidth / width
715+ }
716+ }
717+ ]
718+ }
719+
720 Rectangle {
721 id: selectionHighlight
722+ objectName: "selectionHighlight"
723 anchors.fill: parent
724- anchors.margins: -units.gu(1)
725+ anchors.margins: -root.highlightSize
726 color: "white"
727- opacity: highlightShown ? 0.15 : 0
728- }
729-
730- Rectangle {
731- anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
732- height: units.dp(2)
733- color: theme.palette.normal.focus
734- visible: highlightShown
735+ opacity: showHighlight ? 0.55 : 0
736+ visible: opacity > 0
737 }
738
739 BorderImage {
740+ id: dropShadow
741 anchors {
742- fill: root
743+ left: parent.left; top: parent.top; right: parent.right
744 margins: active ? -units.gu(2) : -units.gu(1.5)
745 }
746- source: "graphics/dropshadow2gu.sci"
747- opacity: root.shadowOpacity * .3
748- visible: !fullscreen
749+ height: Math.min(applicationWindow.implicitHeight, applicationWindow.height) * applicationWindow.itemScale
750+ + root.decorationHeight * Math.min(1, root.showDecoration) + (active ? units.gu(4) : units.gu(3))
751+ source: "../graphics/dropshadow2gu.sci"
752+ opacity: root.shadowOpacity
753 }
754
755 WindowDecoration {
756 id: decoration
757- target: root.parent
758+ target: root.parent || null
759 objectName: "appWindowDecoration"
760 anchors { left: parent.left; top: parent.top; right: parent.right }
761 height: units.gu(3)
762 width: root.width
763 title: applicationWindow.title
764- visible: root.decorationShown
765+ opacity: root.hasDecoration ? Math.min(1, root.showDecoration) : 0
766+
767+ Behavior on opacity { UbuntuNumberAnimation { } }
768
769 onCloseClicked: root.closeClicked();
770 onMaximizeClicked: { root.decorationPressed(); root.maximizeClicked(); }
771@@ -126,16 +184,25 @@
772 ApplicationWindow {
773 id: applicationWindow
774 objectName: "appWindow"
775+ anchors.left: parent.left
776 anchors.top: parent.top
777- anchors.topMargin: decoration.height
778- anchors.left: parent.left
779- readonly property real requestedHeightMinusDecoration: root.requestedHeight - root.visibleDecorationHeight
780- requestedHeight: !counterRotate ? requestedHeightMinusDecoration : root.requestedWidth
781- requestedWidth: !counterRotate ? root.requestedWidth : requestedHeightMinusDecoration
782- interactive: true
783+ anchors.topMargin: root.decorationHeight * Math.min(1, root.showDecoration)
784+ width: implicitWidth
785+ height: implicitHeight
786+ requestedHeight: !counterRotate ? root.requestedHeight - d.requestedDecorationHeight : root.requestedWidth
787+ requestedWidth: !counterRotate ? root.requestedWidth : root.requestedHeight - d.requestedDecorationHeight
788+ property int oldRequestedWidth: requestedWidth
789+ property int oldRequestedHeight: requestedHeight
790+ onRequestedWidthChanged: oldRequestedWidth = requestedWidth
791+ onRequestedHeightChanged: oldRequestedHeight = requestedHeight
792 focus: true
793
794- transform: Rotation {
795+ property real itemScale: 1
796+ property real minSize: Math.min(root.scaleToPreviewSize, Math.min(requestedHeight, Math.min(requestedWidth, Math.min(implicitHeight, implicitWidth))))
797+
798+ transform: [
799+ Rotation {
800+ id: rotationTransform
801 readonly property int rotationAngle: applicationWindow.application &&
802 applicationWindow.application.rotatesWindowContents
803 ? ((360 - applicationWindow.surfaceOrientationAngle) % 360) : 0
804@@ -152,6 +219,19 @@
805 else return 0;
806 }
807 angle: rotationAngle
808- }
809+ },
810+ Scale {
811+ xScale: applicationWindow.itemScale
812+ yScale: applicationWindow.itemScale
813+ }
814+ ]
815+
816+ }
817+
818+ Rectangle {
819+ anchors.fill: parent
820+ color: "black"
821+ opacity: root.darkening && !root.showHighlight ? 0.05 : 0
822+ Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
823 }
824 }
825
826=== modified file 'qml/Stage/MoveHandler.qml'
827--- qml/Stages/MoveHandler.qml 2016-09-08 14:13:27 +0000
828+++ qml/Stage/MoveHandler.qml 2016-10-05 14:03:04 +0000
829@@ -112,8 +112,8 @@
830 // Use integer coordinate values to ensure that target is left in a pixel-aligned
831 // position. Mouse movement could have subpixel precision, yielding a fractional
832 // mouse position.
833- target.requestedX = Math.round(pos.x - priv.distanceX);
834- target.requestedY = Math.round(Math.max(pos.y - priv.distanceY, PanelState.panelHeight));
835+ target.windowedX = Math.round(pos.x - priv.distanceX);
836+ target.windowedY = Math.round(Math.max(pos.y - priv.distanceY, PanelState.panelHeight));
837
838 if (sensingPoints) { // edge/corner detection when dragging via the touch overlay
839 if (sensingPoints.topLeft.x < priv.triggerArea && sensingPoints.topLeft.y < PanelState.panelHeight + priv.triggerArea
840
841=== modified file 'qml/Stage/PromptSurfaceAnimations.qml'
842--- qml/Stages/PromptSurfaceAnimations.qml 2016-04-04 13:38:56 +0000
843+++ qml/Stage/PromptSurfaceAnimations.qml 2016-10-05 14:03:04 +0000
844@@ -43,7 +43,7 @@
845 SequentialAnimation {
846 // clip so we don't go out of parent's bounds during spread
847 PropertyAction { target: root.container.parent; property: "clip"; value: true }
848- UbuntuNumberAnimation { target: root.surfaceItem; property: "y"; to: root.container.height
849+ UbuntuNumberAnimation { target: root.surfaceItem; property: "anchors.topMargin"; to: root.container.height
850 duration: UbuntuAnimation.BriskDuration }
851 PropertyAction { target: root.surfaceItem; property: "visible"; value: false }
852 PropertyAction { target: container.parent; property: "clip"; value: false }
853@@ -61,11 +61,10 @@
854 // clip so we don't go out of parent's bounds during spread
855 PropertyAction { target: root.container.parent; property: "clip"; value: true }
856 ScriptAction { script: {
857- root.surfaceItem.y = root.container.height;
858 root.surfaceItem.visible = true;
859 } }
860 UbuntuNumberAnimation {
861- target: root.surfaceItem; property: "y"; to: 0
862+ target: root.surfaceItem; property: "anchors.topMargin"; from: root.container.height; to: 0
863 duration: UbuntuAnimation.BriskDuration
864 }
865 PropertyAction { target: container.parent; property: "clip"; value: false }
866
867=== added directory 'qml/Stage/Spread'
868=== added file 'qml/Stage/Spread/BezierCurve.qml'
869--- qml/Stage/Spread/BezierCurve.qml 1970-01-01 00:00:00 +0000
870+++ qml/Stage/Spread/BezierCurve.qml 2016-10-05 14:03:04 +0000
871@@ -0,0 +1,45 @@
872+/*
873+ * Copyright (C) 2016 Canonical, Ltd.
874+ *
875+ * This program is free software; you can redistribute it and/or modify
876+ * it under the terms of the GNU General Public License as published by
877+ * the Free Software Foundation; version 3.
878+ *
879+ * This program is distributed in the hope that it will be useful,
880+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
881+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
882+ * GNU General Public License for more details.
883+ *
884+ * You should have received a copy of the GNU General Public License
885+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
886+ */
887+
888+import QtQuick 2.4
889+import Ubuntu.Components 1.3
890+import QtQuick.Window 2.2
891+import 'cubic-bezier.js' as Bezier
892+import 'KeySpline.js' as KeySpline
893+
894+Item {
895+ id: root
896+
897+ property var controlPoint1: {'x':0, 'y':0}
898+ property var controlPoint2: {'x':0, 'y':0}
899+ property var controlPoint3: {'x':0.58, 'y':1}
900+ property var controlPoint4: {'x':1, 'y':1}
901+
902+ function getValues(t) {
903+ if (t<0) t=0
904+ else if (t>1)t=1
905+
906+ return Bezier.getBezier(t, controlPoint1, controlPoint2, controlPoint3, controlPoint4)
907+ }
908+
909+ function getYFromX(x) {
910+ var spline = new KeySpline.keySpline(controlPoint2.x, controlPoint2.y, controlPoint3.x, controlPoint3.y)
911+ if (x<0) x=0
912+ else if (x>1)x=1
913+
914+ return spline.get(x)
915+ }
916+}
917
918=== added file 'qml/Stage/Spread/KeySpline.js'
919--- qml/Stage/Spread/KeySpline.js 1970-01-01 00:00:00 +0000
920+++ qml/Stage/Spread/KeySpline.js 2016-10-05 14:03:04 +0000
921@@ -0,0 +1,66 @@
922+/** MIT License
923+ *
924+ * KeySpline - use bezier curve for transition easing function
925+ * Copyright (c) 2012 Gaetan Renaudeau <renaudeau.gaetan@gmail.com>
926+ *
927+ * Permission is hereby granted, free of charge, to any person obtaining a
928+ * copy of this software and associated documentation files (the "Software"),
929+ * to deal in the Software without restriction, including without limitation
930+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
931+ * and/or sell copies of the Software, and to permit persons to whom the
932+ * Software is furnished to do so, subject to the following conditions:
933+ *
934+ * The above copyright notice and this permission notice shall be included in
935+ * all copies or substantial portions of the Software.
936+ *
937+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
938+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
939+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
940+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
941+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
942+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
943+ * DEALINGS IN THE SOFTWARE.
944+ */
945+/**
946+* KeySpline - use bezier curve for transition easing function
947+* is inspired from Firefox's nsSMILKeySpline.cpp
948+* Usage:
949+* var spline = new KeySpline(0.25, 0.1, 0.25, 1.0)
950+* spline.get(x) => returns the easing value | x must be in [0, 1] range
951+*/
952+
953+.pragma library
954+
955+function keySpline (mX1, mY1, mX2, mY2) {
956+
957+ this.get = function(aX) {
958+ if (mX1 == mY1 && mX2 == mY2) return aX; // linear
959+ return CalcBezier(GetTForX(aX), mY1, mY2);
960+ }
961+
962+ function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
963+ function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
964+ function C(aA1) { return 3.0 * aA1; }
965+
966+ // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
967+ function CalcBezier(aT, aA1, aA2) {
968+ return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT;
969+ }
970+
971+ // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
972+ function GetSlope(aT, aA1, aA2) {
973+ return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
974+ }
975+
976+ function GetTForX(aX) {
977+ // Newton raphson iteration
978+ var aGuessT = aX;
979+ for (var i = 0; i < 4; ++i) {
980+ var currentSlope = GetSlope(aGuessT, mX1, mX2);
981+ if (currentSlope == 0.0) return aGuessT;
982+ var currentX = CalcBezier(aGuessT, mX1, mX2) - aX;
983+ aGuessT -= currentX / currentSlope;
984+ }
985+ return aGuessT;
986+ }
987+}
988
989=== added file 'qml/Stage/Spread/MathUtils.js'
990--- qml/Stage/Spread/MathUtils.js 1970-01-01 00:00:00 +0000
991+++ qml/Stage/Spread/MathUtils.js 2016-10-05 14:03:04 +0000
992@@ -0,0 +1,95 @@
993+/*
994+ * Copyright (C) 2016 Canonical, Ltd.
995+ *
996+ * This program is free software; you can redistribute it and/or modify
997+ * it under the terms of the GNU General Public License as published by
998+ * the Free Software Foundation; version 3.
999+ *
1000+ * This program is distributed in the hope that it will be useful,
1001+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1002+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1003+ * GNU General Public License for more details.
1004+ *
1005+ * You should have received a copy of the GNU General Public License
1006+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1007+ */
1008+
1009+.pragma library
1010+
1011+/**
1012+ * From processing.js: https://raw.githubusercontent.com/processing-js/processing-js/v1.4.8/processing.js
1013+ *
1014+ * Re-map a number from one range to another. In the example above, the number
1015+ * '25' is converted from a value in the range 0..100 into a value that
1016+ * ranges from the left edge (0) to the right edge (width) of the screen.
1017+ * Numbers outside the range are not clamped to 0 and 1, because out-of-range
1018+ * values are often intentional and useful.
1019+ *
1020+ * @param {Number} value The incoming value to be converted
1021+ * @param {Number} istart Lower bound of the value's current range
1022+ * @param {Number} istop Upper bound of the value's current range
1023+ * @param {Number} ostart Lower bound of the value's target range
1024+ * @param {Number} ostop Upper bound of the value's target range
1025+ *
1026+ * @returns {Number}
1027+ */
1028+function map(value, istart, istop, ostart, ostop) {
1029+ return ostart + (ostop - ostart) * ((value - istart) / (istop - istart))
1030+}
1031+
1032+/**
1033+ * Return a value which is always between `min` and `max`
1034+ *
1035+ * @param {Number} value The current value
1036+ * @param {Number} min The minimum value
1037+ * @param {Number} max The maximum value
1038+ *
1039+ * @returns {Number}
1040+ */
1041+function clamp(value, min, max) {
1042+ if (value < min) return min
1043+ if (value > max) return max
1044+ return value
1045+}
1046+
1047+// calculates the distance from the middle of one rect to middle of other rect
1048+function rectDistance(rect1, rect2) {
1049+ return pointDistance(Qt.point(rect1.x + rect1.width / 2, rect1.y + rect1.height / 2),
1050+ Qt.point(rect2.x + rect2.width / 2, rect2.y + rect2.height / 2))
1051+}
1052+
1053+// calculates the distance between two points
1054+function pointDistance(point1, point2) {
1055+ return Math.sqrt(Math.pow(point1.x - point2.x, 2) +
1056+ Math.pow(point1.y - point2.y, 2)
1057+ )
1058+}
1059+
1060+// from http://stackoverflow.com/questions/14616829/java-method-to-find-the-rectangle-that-is-the-intersection-of-two-rectangles-usi
1061+function intersectionRect(r1, r2) {
1062+ var xmin = Math.max(r1.x, r2.x);
1063+ var xmax1 = r1.x + r1.width;
1064+ var xmax2 = r2.x + r2.width;
1065+ var xmax = Math.min(xmax1, xmax2);
1066+ var out = {x:0, y:0, width:0, height:0}
1067+ if (xmax > xmin) {
1068+ var ymin = Math.max(r1.y, r2.y);
1069+ var ymax1 = r1.y + r1.height;
1070+ var ymax2 = r2.y + r2.height;
1071+ var ymax = Math.min(ymax1, ymax2);
1072+ if (ymax > ymin) {
1073+ out.x = xmin;
1074+ out.y = ymin;
1075+ out.width = xmax - xmin;
1076+ out.height = ymax - ymin;
1077+ }
1078+ }
1079+ return out;
1080+}
1081+
1082+function easeOutCubic(t) { return (--t)*t*t+1 }
1083+
1084+function linearAnimation(startProgress, endProgress, startValue, endValue, progress) {
1085+ // progress : progressDiff = value : valueDiff => value = progress * valueDiff / progressDiff
1086+ return (progress - startProgress) * (endValue - startValue) / (endProgress - startProgress) + startValue;
1087+}
1088
1089=== added file 'qml/Stage/Spread/OpacityMask.qml'
1090--- qml/Stage/Spread/OpacityMask.qml 1970-01-01 00:00:00 +0000
1091+++ qml/Stage/Spread/OpacityMask.qml 2016-10-05 14:03:04 +0000
1092@@ -0,0 +1,82 @@
1093+/*
1094+ * Copyright (C) 2016 Canonical, Ltd.
1095+ *
1096+ * This program is free software; you can redistribute it and/or modify
1097+ * it under the terms of the GNU General Public License as published by
1098+ * the Free Software Foundation; version 3.
1099+ *
1100+ * This program is distributed in the hope that it will be useful,
1101+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1102+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1103+ * GNU General Public License for more details.
1104+ *
1105+ * You should have received a copy of the GNU General Public License
1106+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1107+ */
1108+
1109+import QtQuick 2.4
1110+
1111+Item {
1112+ id: root
1113+ anchors.fill: sourceItem
1114+ anchors.margins: -units.gu(2)
1115+ visible: sourceItem !== null
1116+
1117+ property var sourceItem: null
1118+ property int maskX: 0
1119+ property int maskY: 0
1120+ property int maskWidth: 0
1121+ property int maskHeight: 0
1122+
1123+ property real opacityValue: 1
1124+
1125+ Item {
1126+ id: opacityMask
1127+ anchors.fill: parent
1128+
1129+ Rectangle {
1130+ id: clipRect
1131+ color: "black"
1132+ x: root.maskX - root.anchors.margins
1133+ y: root.maskY - root.anchors.margins
1134+ width: root.maskWidth
1135+ height: root.maskHeight
1136+ opacity: 1 - root.opacityValue
1137+ }
1138+ }
1139+
1140+ ShaderEffect {
1141+ id: opacityEffect
1142+ anchors.fill: parent
1143+
1144+ property variant source: ShaderEffectSource {
1145+ id: shaderEffectSource
1146+ sourceItem: root.sourceItem
1147+ sourceRect: root.sourceItem ? Qt.rect(sourceItem.x + root.anchors.margins,
1148+ sourceItem.y + root.anchors.margins,
1149+ sourceItem.width - root.anchors.margins * 2,
1150+ sourceItem.height - root.anchors.margins * 2)
1151+ : Qt.rect(0,0,0,0)
1152+ hideSource: true
1153+ }
1154+
1155+ property var mask: ShaderEffectSource {
1156+ sourceItem: opacityMask
1157+ hideSource: true
1158+ }
1159+
1160+ fragmentShader: "
1161+ varying highp vec2 qt_TexCoord0;
1162+ uniform sampler2D source;
1163+ uniform sampler2D mask;
1164+ void main(void)
1165+ {
1166+ highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
1167+ highp vec4 maskColor = texture2D(mask, qt_TexCoord0);
1168+
1169+ sourceColor *= 1.0 - maskColor.a;
1170+
1171+ gl_FragColor = sourceColor;
1172+ }"
1173+ }
1174+}
1175
1176=== added file 'qml/Stage/Spread/Spread.qml'
1177--- qml/Stage/Spread/Spread.qml 1970-01-01 00:00:00 +0000
1178+++ qml/Stage/Spread/Spread.qml 2016-10-05 14:03:04 +0000
1179@@ -0,0 +1,162 @@
1180+/*
1181+ * Copyright (C) 2016 Canonical, Ltd.
1182+ *
1183+ * This program is free software; you can redistribute it and/or modify
1184+ * it under the terms of the GNU General Public License as published by
1185+ * the Free Software Foundation; version 3.
1186+ *
1187+ * This program is distributed in the hope that it will be useful,
1188+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1189+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1190+ * GNU General Public License for more details.
1191+ *
1192+ * You should have received a copy of the GNU General Public License
1193+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1194+ */
1195+
1196+import QtQuick 2.4
1197+import Ubuntu.Components 1.3
1198+import "MathUtils.js" as MathUtils
1199+
1200+Item {
1201+ id: root
1202+
1203+ // Information about the environment
1204+ property int highlightedIndex: -1
1205+ property var model: null
1206+ property int leftMargin: 0
1207+ property var spreadFlickable
1208+
1209+ // some config options
1210+ property real contentMargin: 0.16 * root.height
1211+ property real contentTopMargin: contentMargin
1212+ property real contentBottomMargin: 0.35 * contentMargin
1213+ property real windowTitleTopMargin: 3/4 * (contentTopMargin - windowTitle.height)
1214+ property int stackItemCount: 3
1215+ property real leftRotationAngle: 22
1216+ property real rightRotationAngle: 32
1217+ property real leftStackScale: .82
1218+ property real rightStackScale: 1
1219+ property real rightEdgeBreakPoint: Math.min(units.gu(40) / root.width, .35)
1220+
1221+ signal leaveSpread()
1222+
1223+ // Calculated stuff
1224+ readonly property int totalItemCount: model.count
1225+ readonly property real leftStackXPos: 0.03 * root.width + leftMargin
1226+ readonly property real rightStackXPos: root.width - 1.5 * leftStackXPos + leftMargin
1227+
1228+ readonly property real stackHeight: spreadItemHeight - appInfoHeight
1229+ readonly property real stackWidth: Math.min(leftStackXPos/3, units.gu(1.5))
1230+
1231+ readonly property real spreadWidth: rightStackXPos - leftStackXPos
1232+ readonly property real spreadHeight: root.height
1233+ readonly property real spreadItemHeight: spreadHeight - contentTopMargin - contentBottomMargin
1234+ readonly property real spreadItemWidth: stackHeight
1235+
1236+ readonly property real dynamicLeftRotationAngle: leftRotationAngle * rotationAngleFactor
1237+ readonly property real dynamicRightRotationAngle: rightRotationAngle * rotationAngleFactor
1238+
1239+ readonly property real appInfoHeight: {
1240+ var screenHeightReferencePoint = 40 // ref screen height in gu
1241+ var valueAtReferencePoint = 0.17 // of screen height at the reference point
1242+ var appInfoHeightValueChange = -0.0014 // units / gu
1243+ var minAppInfoHeight = 0.08
1244+ var maxAppInfoHeight = 0.2
1245+ var screenHeightInGU = root.height / units.gu(1) // screenHeight in gu
1246+
1247+ return MathUtils.clamp(valueAtReferencePoint + appInfoHeightValueChange * (screenHeightInGU - screenHeightReferencePoint), minAppInfoHeight, maxAppInfoHeight) * root.height
1248+ }
1249+
1250+ property real rotationAngleFactor: {
1251+ var spreadHeightReferencePoint = 28 // reference spread height in gu
1252+ var valueAtReferencePoint = 1.3
1253+ var rotationAngleValueChange = -0.008 // units / gu
1254+ var minRotationAngleFactor = 0.6
1255+ var maxRotationAngleFactor = 1.5
1256+ var spreadHeightInGU = spreadHeight / units.gu(1)
1257+
1258+ return MathUtils.clamp(valueAtReferencePoint + rotationAngleValueChange * (spreadHeightInGU - spreadHeightReferencePoint), minRotationAngleFactor, maxRotationAngleFactor)
1259+ }
1260+ readonly property real itemOverlap: {
1261+ var spreadAspectRatioReferencePoint = 1.0 // ref screen height in gu
1262+ var valueAtReferencePoint = 0.74 // of screen height at the reference point
1263+ var itemOverlapValueChange = -0.068
1264+ var minOverlap = 0.55
1265+ var maxOverlap = 0.82
1266+ var spreadAspectRatio = spreadWidth / stackHeight // spread stack aspect ratio (app info not included)
1267+
1268+ return MathUtils.clamp(valueAtReferencePoint + itemOverlapValueChange * (spreadAspectRatio - spreadAspectRatioReferencePoint), minOverlap, maxOverlap)
1269+ }
1270+
1271+ readonly property real visibleItemCount: (spreadWidth / spreadItemWidth) / (1 - itemOverlap)
1272+
1273+ readonly property real spreadTotalWidth: totalItemCount * spreadWidth / visibleItemCount
1274+
1275+ readonly property real centeringOffset: Math.max(spreadWidth - spreadTotalWidth ,0) / (2 * spreadWidth)
1276+
1277+
1278+ readonly property var curve: BezierCurve {
1279+ controlPoint2: {'x': 0.19, 'y': 0.00}
1280+ controlPoint3: {'x': 0.91, 'y': 1.00}
1281+ }
1282+
1283+ Label {
1284+ id: windowTitle
1285+
1286+ width: Math.min(implicitWidth, 0.5*root.width)
1287+ elide: Qt.ElideMiddle
1288+ anchors.horizontalCenter: parent.horizontalCenter
1289+ y: windowTitleTopMargin
1290+ readonly property var highlightedSurface: root.model ? root.model.surfaceAt(root.highlightedIndex) : null
1291+ readonly property var highlightedApp: root.model ? root.model.applicationAt(root.highlightedIndex) : null
1292+ text: root.highlightedIndex >= 0 && highlightedSurface && highlightedSurface.name != "" ? highlightedSurface.name :
1293+ highlightedApp ? highlightedApp.name : ""
1294+ fontSize: root.height < units.gu(85) ? 'medium' : 'large'
1295+ color: "white"
1296+ opacity: root.highlightedIndex >= 0 ? 1 : 0
1297+ Behavior on opacity { UbuntuNumberAnimation { } }
1298+ }
1299+
1300+ Keys.onPressed: {
1301+ switch (event.key) {
1302+ case Qt.Key_Left:
1303+ case Qt.Key_Backtab:
1304+ selectPrevious(event.isAutoRepeat)
1305+ event.accepted = true;
1306+ break;
1307+ case Qt.Key_Right:
1308+ case Qt.Key_Tab:
1309+ selectNext(event.isAutoRepeat)
1310+ event.accepted = true;
1311+ break;
1312+ case Qt.Key_Escape:
1313+ highlightedIndex = -1
1314+ // Falling through intentionally
1315+ case Qt.Key_Enter:
1316+ case Qt.Key_Return:
1317+ case Qt.Key_Space:
1318+ root.leaveSpread();
1319+ event.accepted = true;
1320+ }
1321+ }
1322+
1323+
1324+ function selectNext(isAutoRepeat) {
1325+ if (isAutoRepeat && highlightedIndex >= totalItemCount -1) {
1326+ return; // AutoRepeat is not allowed to wrap around
1327+ }
1328+
1329+ highlightedIndex = (highlightedIndex + 1) % totalItemCount;
1330+ spreadFlickable.snap(highlightedIndex)
1331+ }
1332+
1333+ function selectPrevious(isAutoRepeat) {
1334+ if (isAutoRepeat && highlightedIndex == 0) {
1335+ return; // AutoRepeat is not allowed to wrap around
1336+ }
1337+
1338+ highlightedIndex = highlightedIndex - 1 >= 0 ? highlightedIndex - 1 : totalItemCount - 1;
1339+ spreadFlickable.snap(highlightedIndex)
1340+ }
1341+}
1342
1343=== added file 'qml/Stage/Spread/SpreadDelegateInputArea.qml'
1344--- qml/Stage/Spread/SpreadDelegateInputArea.qml 1970-01-01 00:00:00 +0000
1345+++ qml/Stage/Spread/SpreadDelegateInputArea.qml 2016-10-05 14:03:04 +0000
1346@@ -0,0 +1,183 @@
1347+/*
1348+ * Copyright (C) 2016 Canonical, Ltd.
1349+ *
1350+ * This program is free software; you can redistribute it and/or modify
1351+ * it under the terms of the GNU General Public License as published by
1352+ * the Free Software Foundation; version 3.
1353+ *
1354+ * This program is distributed in the hope that it will be useful,
1355+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1356+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1357+ * GNU General Public License for more details.
1358+ *
1359+ * You should have received a copy of the GNU General Public License
1360+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1361+ */
1362+
1363+import QtQuick 2.4
1364+import Ubuntu.Components 1.3
1365+import Ubuntu.Gestures 0.1
1366+import "../../Components"
1367+
1368+Item {
1369+ id: root
1370+
1371+ property bool closeable: true
1372+ readonly property real minSpeedToClose: units.gu(40)
1373+ property bool zeroVelocityCounts: false
1374+
1375+ readonly property alias distance: d.distance
1376+
1377+ signal clicked()
1378+ signal close()
1379+
1380+ QtObject {
1381+ id: d
1382+ property real distance: 0
1383+ property bool moving: false
1384+ property var dragEvents: []
1385+ property real dragVelocity: 0
1386+ property int threshold: units.gu(2)
1387+
1388+ // Can be replaced with a fake implementation during tests
1389+ // property var __getCurrentTimeMs: function () { return new Date().getTime() }
1390+ property var __dateTime: new function() {
1391+ this.getCurrentTimeMs = function() {return new Date().getTime()}
1392+ }
1393+
1394+ function pushDragEvent(event) {
1395+ var currentTime = __dateTime.getCurrentTimeMs()
1396+ dragEvents.push([currentTime, event.x, event.y, getEventSpeed(currentTime, event)])
1397+ cullOldDragEvents(currentTime)
1398+ updateSpeed()
1399+ }
1400+
1401+ function cullOldDragEvents(currentTime) {
1402+ // cull events older than 50 ms but always keep the latest 2 events
1403+ for (var numberOfCulledEvents = 0; numberOfCulledEvents < dragEvents.length-2; numberOfCulledEvents++) {
1404+ // dragEvents[numberOfCulledEvents][0] is the dragTime
1405+ if (currentTime - dragEvents[numberOfCulledEvents][0] <= 50) break
1406+ }
1407+
1408+ dragEvents.splice(0, numberOfCulledEvents)
1409+ }
1410+
1411+ function updateSpeed() {
1412+ var totalSpeed = 0
1413+ for (var i = 0; i < dragEvents.length; i++) {
1414+ totalSpeed += dragEvents[i][3]
1415+ }
1416+
1417+ if (zeroVelocityCounts || Math.abs(totalSpeed) > 0.001) {
1418+ dragVelocity = totalSpeed / dragEvents.length * 1000
1419+ }
1420+ }
1421+
1422+ function getEventSpeed(currentTime, event) {
1423+ if (dragEvents.length != 0) {
1424+ var lastDrag = dragEvents[dragEvents.length-1]
1425+ var duration = Math.max(1, currentTime - lastDrag[0])
1426+ return (event.y - lastDrag[2]) / duration
1427+ } else {
1428+ return 0
1429+ }
1430+ }
1431+ }
1432+
1433+ // Event eater
1434+ MouseArea {
1435+ anchors.fill: parent
1436+ onClicked: root.clicked()
1437+ onWheel: wheel.accepted = true
1438+ }
1439+
1440+ MultiPointTouchArea {
1441+ anchors.fill: parent
1442+ mouseEnabled: false
1443+ maximumTouchPoints: 1
1444+ property int offset: 0
1445+
1446+ touchPoints: [
1447+ TouchPoint {
1448+ id: tp
1449+ }
1450+ ]
1451+
1452+ onCanceled: {
1453+ d.moving = false
1454+ animation.animate("center");
1455+ }
1456+
1457+ onTouchUpdated: {
1458+ if (!d.moving) {
1459+ if (Math.abs(tp.startY - tp.y) > d.threshold) {
1460+ d.moving = true;
1461+ d.dragEvents = []
1462+ offset = tp.y - tp.startY;
1463+ } else {
1464+ return;
1465+ }
1466+ }
1467+
1468+ d.distance = tp.y - tp.startY - offset
1469+ d.pushDragEvent(tp);
1470+ }
1471+
1472+ onReleased: {
1473+ if (!d.moving) {
1474+ root.clicked()
1475+ }
1476+
1477+ if (!root.closeable) {
1478+ animation.animate("center")
1479+ return;
1480+ }
1481+
1482+ var touchPoint = touchPoints[0];
1483+
1484+ if ((d.dragVelocity < -root.minSpeedToClose && d.distance < -units.gu(8)) || d.distance < -root.height / 2) {
1485+ animation.animate("up")
1486+ } else if ((d.dragVelocity > root.minSpeedToClose && d.distance > units.gu(8)) || d.distance > root.height / 2) {
1487+ animation.animate("down")
1488+ } else {
1489+ animation.animate("center")
1490+ }
1491+ }
1492+ }
1493+
1494+ UbuntuNumberAnimation {
1495+ id: animation
1496+ objectName: "closeAnimation"
1497+ target: d
1498+ property: "distance"
1499+ property bool requestClose: false
1500+
1501+ function animate(direction) {
1502+ animation.from = dragArea.distance;
1503+ switch (direction) {
1504+ case "up":
1505+ animation.to = -root.height * 1.5;
1506+ requestClose = true;
1507+ break;
1508+ case "down":
1509+ animation.to = root.height * 1.5;
1510+ requestClose = true;
1511+ break;
1512+ default:
1513+ animation.to = 0
1514+ }
1515+ animation.start();
1516+ }
1517+
1518+ onRunningChanged: {
1519+ if (!running) {
1520+ d.moving = false;
1521+ if (requestClose) {
1522+ root.close();
1523+ } else {
1524+ d.distance = 0;
1525+ }
1526+ }
1527+ }
1528+ }
1529+}
1530
1531=== added file 'qml/Stage/Spread/SpreadMaths.qml'
1532--- qml/Stage/Spread/SpreadMaths.qml 1970-01-01 00:00:00 +0000
1533+++ qml/Stage/Spread/SpreadMaths.qml 2016-10-05 14:03:04 +0000
1534@@ -0,0 +1,78 @@
1535+/*
1536+ * Copyright (C) 2016 Canonical, Ltd.
1537+ *
1538+ * This program is free software; you can redistribute it and/or modify
1539+ * it under the terms of the GNU General Public License as published by
1540+ * the Free Software Foundation; version 3.
1541+ *
1542+ * This program is distributed in the hope that it will be useful,
1543+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1544+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1545+ * GNU General Public License for more details.
1546+ *
1547+ * You should have received a copy of the GNU General Public License
1548+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1549+ */
1550+
1551+import QtQuick 2.4
1552+import Ubuntu.Components 1.3
1553+import Utils 0.1
1554+import "MathUtils.js" as MathUtils
1555+
1556+Item {
1557+ id: root
1558+ anchors { left: parent.left; top: parent.top; margins: units.gu(1) }
1559+
1560+ // Information about the environment
1561+ property Item flickable: null
1562+ property Spread spread: null
1563+ property int itemIndex: 0
1564+
1565+ // Internal
1566+ property real spreadPosition: itemIndex/spread.visibleItemCount - flickable.contentX/spread.spreadWidth // 0 -> left stack, 1 -> right stack
1567+ property real leftStackingProgress: MathUtils.clamp(MathUtils.map(spreadPosition, 0, -spread.stackItemCount/spread.visibleItemCount , 0, 1), 0, 1)
1568+ property real rightStackingProgress: MathUtils.clamp(MathUtils.map(spreadPosition, 1, 1 + spread.stackItemCount/spread.visibleItemCount , 0, 1), 0, 1)
1569+ property real stackingX: (MathUtils.easeOutCubic(rightStackingProgress) - MathUtils.easeOutCubic(leftStackingProgress)) * spread.stackWidth
1570+
1571+
1572+ QtObject {
1573+ id: d
1574+ property real spreadScale: MathUtils.clamp(
1575+ MathUtils.map(spreadPosition, 0, 1, spread.leftStackScale, spread.rightStackScale),
1576+ spread.leftStackScale, spread.rightStackScale)
1577+
1578+ property real selectedScale: (spread.highlightedIndex == itemIndex ? 1.01 : 1)
1579+ Behavior on selectedScale { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
1580+
1581+ }
1582+
1583+ // Output
1584+ readonly property int targetX: spread.leftStackXPos +
1585+ spread.spreadWidth * spread.curve.getYFromX(spreadPosition + spread.centeringOffset) +
1586+ stackingX
1587+
1588+ readonly property int targetY: spread.contentTopMargin
1589+
1590+ readonly property real targetAngle: MathUtils.clamp(
1591+ MathUtils.map(targetX, spread.leftStackXPos, spread.rightStackXPos, spread.dynamicLeftRotationAngle, spread.dynamicRightRotationAngle),
1592+ Math.min(spread.dynamicLeftRotationAngle, spread.dynamicRightRotationAngle), Math.max(spread.dynamicLeftRotationAngle, spread.dynamicRightRotationAngle))
1593+
1594+
1595+ readonly property real targetScale: d.spreadScale * d.selectedScale
1596+
1597+ readonly property real shadowOpacity: 0.2 * (1 - rightStackingProgress) * (1 - leftStackingProgress)
1598+
1599+
1600+ readonly property real closeIconOffset: (targetScale - 1) * (-spread.stackHeight / 2)
1601+
1602+ readonly property real tileInfoOpacity: Math.min(MathUtils.clamp(MathUtils.map(leftStackingProgress, 0 , 1/(spread.stackItemCount*3), 1, 0), 0 , 1),
1603+ MathUtils.clamp(MathUtils.map(spreadPosition, 0.9 , 1, 1, 0), 0 , 1)) /** MathUtils.map(curvedSwitcherProgress, 0.7, 0.9, 0, 1)*/
1604+
1605+ readonly property bool itemVisible: {
1606+ var leftStackHidden = spreadPosition < -(spread.stackItemCount + 1)/spread.visibleItemCount
1607+ // don't hide the rightmost
1608+ var rightStackHidden = (spreadPosition > 1 + (spread.stackItemCount)/spread.visibleItemCount) && itemIndex !== spread.totalItemCount - 1
1609+ return !leftStackHidden && !rightStackHidden
1610+ }
1611+
1612+}
1613
1614=== added file 'qml/Stage/Spread/StagedRightEdgeMaths.qml'
1615--- qml/Stage/Spread/StagedRightEdgeMaths.qml 1970-01-01 00:00:00 +0000
1616+++ qml/Stage/Spread/StagedRightEdgeMaths.qml 2016-10-05 14:03:04 +0000
1617@@ -0,0 +1,174 @@
1618+/*
1619+ * Copyright (C) 2016 Canonical, Ltd.
1620+ *
1621+ * This program is free software; you can redistribute it and/or modify
1622+ * it under the terms of the GNU General Public License as published by
1623+ * the Free Software Foundation; version 3.
1624+ *
1625+ * This program is distributed in the hope that it will be useful,
1626+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1627+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1628+ * GNU General Public License for more details.
1629+ *
1630+ * You should have received a copy of the GNU General Public License
1631+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1632+ */
1633+
1634+import QtQuick 2.4
1635+import Ubuntu.Components 1.3
1636+import Unity.Application 0.1
1637+import "MathUtils.js" as MathUtils
1638+
1639+QtObject {
1640+ id: root
1641+
1642+ // Input
1643+ property int itemIndex: 0
1644+ property real progress: 0
1645+ property int sceneWidth: 0
1646+ property int sideStageWidth: 0
1647+ property int sceneHeight: 0
1648+ property int targetX: 0
1649+ property int startY: 0
1650+ property int targetY: 0
1651+ property real startAngle: 30
1652+ property real targetAngle: 0
1653+ property int targetHeight: 0
1654+ property real startScale: 1.3
1655+ property real targetScale: 0
1656+ property real breakPoint: units.gu(15) / sceneWidth
1657+
1658+ property bool isMainStageApp: false
1659+ property bool isSideStageApp: false
1660+ property bool sideStageOpen: false
1661+ property int nextInStack: 0
1662+ property int shuffledZ: 0
1663+
1664+
1665+ // Config
1666+ property int tileDistance: units.gu(10)
1667+
1668+ // Output
1669+
1670+ readonly property real scaleToPreviewProgress: {
1671+ return progress < breakPoint ? 0 : MathUtils.clamp(MathUtils.linearAnimation(breakPoint, 1, 0, 1, progress), 0, 1)
1672+ }
1673+ readonly property int animatedWidth: {
1674+ return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneWidth, targetHeight, progress)
1675+ }
1676+
1677+ readonly property int animatedHeight: {
1678+ return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneHeight, targetHeight, progress)
1679+ }
1680+
1681+
1682+ readonly property int animatedX: {
1683+ var nextStage = appRepeater.itemAt(nextInStack) ? appRepeater.itemAt(nextInStack).stage : ApplicationInfoInterface.MainStage;
1684+
1685+ var startX = 0;
1686+ if (isMainStageApp) {
1687+ if (progress < breakPoint) {
1688+ if (nextStage == ApplicationInfoInterface.MainStage) {
1689+ return MathUtils.linearAnimation(0, breakPoint, 0, -units.gu(4), progress);
1690+ } else {
1691+ return 0;
1692+ }
1693+ } else {
1694+ if (nextStage == ApplicationInfoInterface.MainStage) {
1695+ return MathUtils.linearAnimation(breakPoint, 1, -units.gu(4), targetX, progress);
1696+ } else {
1697+ return MathUtils.linearAnimation(breakPoint, 1, 0, targetX, progress);
1698+ }
1699+ }
1700+ } else if (isSideStageApp) {
1701+ startX = sceneWidth - sideStageWidth;
1702+ } else if (itemIndex == nextInStack && itemIndex <= 2 && priv.sideStageDelegate && nextStage == ApplicationInfoInterface.MainStage) {
1703+ startX = sceneWidth - sideStageWidth;
1704+ } else {
1705+ var stageCount = (priv.mainStageDelegate ? 1 : 0) + (priv.sideStageDelegate ? 1 : 0)
1706+ startX = sceneWidth + Math.max(0, itemIndex - stageCount - 1) * tileDistance;
1707+ }
1708+
1709+ if (itemIndex == nextInStack) {
1710+ if (progress < breakPoint) {
1711+ return MathUtils.linearAnimation(0, breakPoint, startX, startX * (1 - breakPoint), progress)
1712+ }
1713+ return MathUtils.linearAnimation(breakPoint, 1, startX * (1 - breakPoint), targetX, progress)
1714+ }
1715+
1716+ if (progress < breakPoint) {
1717+ return startX;
1718+ }
1719+
1720+ return MathUtils.linearAnimation(breakPoint, 1, startX, targetX, progress)
1721+
1722+ }
1723+
1724+ readonly property int animatedY: progress < breakPoint ? startY : MathUtils.linearAnimation(breakPoint, 1, startY, targetY, progress)
1725+
1726+ readonly property int animatedZ: {
1727+ if (progress < breakPoint + (1 - breakPoint) / 2) {
1728+ return shuffledZ
1729+ }
1730+ return itemIndex;
1731+ }
1732+
1733+ readonly property real animatedAngle: {
1734+ var nextStage = appRepeater.itemAt(nextInStack) ? appRepeater.itemAt(nextInStack).stage : ApplicationInfoInterface.MainStage;
1735+
1736+ var startAngle = 0;
1737+ if (isMainStageApp) {
1738+ startAngle = 0;
1739+ } else if (isSideStageApp) {
1740+ startAngle = 0;
1741+ } else {
1742+ if (stage == ApplicationInfoInterface.SideStage && itemIndex == nextInStack && !sideStageOpen) {
1743+ startAngle = 0;
1744+ } else {
1745+ startAngle = root.startAngle;
1746+ }
1747+ }
1748+
1749+ if ((itemIndex == nextInStack)
1750+ || (isMainStageApp && nextStage === ApplicationInfoInterface.MainStage)
1751+ || (isSideStageApp && nextStage === ApplicationInfoInterface.SideStage)) {
1752+ return MathUtils.linearAnimation(0, 1, startAngle, targetAngle, progress);
1753+ }
1754+
1755+ if (progress < breakPoint) {
1756+ return 0;
1757+ }
1758+ return MathUtils.linearAnimation(breakPoint, 1, startAngle, targetAngle, progress);
1759+ }
1760+
1761+ readonly property real animatedScale: {
1762+ var pullingInSideStage = itemIndex == nextInStack && stage == ApplicationInfoInterface.SideStage && !sideStageOpen;
1763+
1764+ var startScale = 1;
1765+ if (isMainStageApp) {
1766+ startScale = 1;
1767+ } else if (isSideStageApp) {
1768+ startScale = 1;
1769+ } else {
1770+ if (pullingInSideStage) {
1771+ startScale = 1
1772+ } else {
1773+ startScale = root.startScale;
1774+ }
1775+ }
1776+
1777+ if (progress < breakPoint) {
1778+ if (itemIndex == nextInStack && (sideStageOpen || stage == ApplicationInfoInterface.MainStage)) {
1779+ return MathUtils.linearAnimation(0, 1, startScale, targetScale, progress);
1780+ }
1781+ return startScale;
1782+ }
1783+ if (itemIndex == nextInStack) {
1784+ return MathUtils.linearAnimation(0, 1, startScale, targetScale, progress)
1785+ }
1786+
1787+ return MathUtils.linearAnimation(breakPoint, 1, startScale, targetScale, progress)
1788+ }
1789+
1790+ readonly property bool itemVisible: true //animatedX < sceneWidth
1791+}
1792
1793=== added file 'qml/Stage/Spread/WindowedRightEdgeMaths.qml'
1794--- qml/Stage/Spread/WindowedRightEdgeMaths.qml 1970-01-01 00:00:00 +0000
1795+++ qml/Stage/Spread/WindowedRightEdgeMaths.qml 2016-10-05 14:03:04 +0000
1796@@ -0,0 +1,81 @@
1797+/*
1798+ * Copyright (C) 2016 Canonical, Ltd.
1799+ *
1800+ * This program is free software; you can redistribute it and/or modify
1801+ * it under the terms of the GNU General Public License as published by
1802+ * the Free Software Foundation; version 3.
1803+ *
1804+ * This program is distributed in the hope that it will be useful,
1805+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1806+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1807+ * GNU General Public License for more details.
1808+ *
1809+ * You should have received a copy of the GNU General Public License
1810+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1811+ */
1812+
1813+import QtQuick 2.4
1814+import Ubuntu.Components 1.3
1815+import Unity.Application 0.1
1816+import "MathUtils.js" as MathUtils
1817+
1818+QtObject {
1819+ id: root
1820+
1821+ // Input
1822+ property int itemIndex: 0
1823+ property int normalZ: 0
1824+ property real progress: 0
1825+ property int startWidth: 0
1826+ property int startHeight: 0
1827+ property int startX: 0
1828+ property int targetX: 0
1829+ property int startY: 0
1830+ property int targetY: 0
1831+// property real startAngle: 40
1832+ property real targetAngle: 0
1833+ property int targetHeight: 0
1834+ property real targetScale: 0
1835+
1836+ // Config
1837+ property real breakPoint: 0.4
1838+
1839+ // Output
1840+
1841+ readonly property real scaleToPreviewProgress: {
1842+ return progress < breakPoint ? 0 : MathUtils.clamp(MathUtils.linearAnimation(breakPoint, 1, 0, 1, progress), 0, 1)
1843+ }
1844+ readonly property int animatedWidth: {
1845+ return progress < breakPoint ? root.startWidth : MathUtils.linearAnimation(breakPoint, 1, root.startWidth, targetHeight, progress)
1846+ }
1847+
1848+ readonly property int animatedHeight: {
1849+ return progress < breakPoint ? root.startHeight : MathUtils.linearAnimation(breakPoint, 1, root.startHeight, targetHeight, progress)
1850+ }
1851+
1852+ readonly property int animatedX: {
1853+ if (progress < breakPoint) {
1854+ return startX;
1855+ }
1856+ return MathUtils.linearAnimation(breakPoint, 1, startX, targetX, progress)
1857+ }
1858+
1859+ readonly property int animatedY: progress < breakPoint ? startY : MathUtils.linearAnimation(breakPoint, 1, startY, targetY, progress)
1860+
1861+ readonly property real animatedAngle: progress < breakPoint ? 0 : MathUtils.linearAnimation(breakPoint, 1, 0, targetAngle, progress);
1862+
1863+ readonly property real decorationHeight: progress < breakPoint ? 1 : MathUtils.linearAnimation(breakPoint, 1, 1, 0, progress);
1864+
1865+ readonly property int animatedZ: {
1866+ if (progress < breakPoint + (1 - breakPoint) / 2) {
1867+ return itemIndex == 1 ? normalZ + 2 : normalZ
1868+ }
1869+ return itemIndex
1870+ }
1871+
1872+ readonly property real opacityMask: itemIndex == 1 ? MathUtils.linearAnimation(0, breakPoint, 0, 1, progress) : 1
1873+
1874+ readonly property real animatedScale: progress < breakPoint ? 1 : MathUtils.linearAnimation(breakPoint, 1, 1, targetScale, progress)
1875+
1876+// readonly property bool itemVisible: true //animatedX < sceneWidth
1877+}
1878
1879=== added file 'qml/Stage/Spread/cubic-bezier.js'
1880--- qml/Stage/Spread/cubic-bezier.js 1970-01-01 00:00:00 +0000
1881+++ qml/Stage/Spread/cubic-bezier.js 2016-10-05 14:03:04 +0000
1882@@ -0,0 +1,39 @@
1883+/*
1884+ * Copyright (C) 2016 Canonical, Ltd.
1885+ *
1886+ * This program is free software; you can redistribute it and/or modify
1887+ * it under the terms of the GNU General Public License as published by
1888+ * the Free Software Foundation; version 3.
1889+ *
1890+ * This program is distributed in the hope that it will be useful,
1891+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1892+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1893+ * GNU General Public License for more details.
1894+ *
1895+ * You should have received a copy of the GNU General Public License
1896+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1897+ */
1898+
1899+//====================================\\
1900+// 13thParallel.org Beziér Curve Code \\
1901+// by Dan Pupius (www.pupius.net) \\
1902+//====================================\\
1903+
1904+
1905+var coord = function (x,y) {
1906+ if(!x) var x=0;
1907+ if(!y) var y=0;
1908+ return {x: x, y: y};
1909+}
1910+
1911+function B4(t) { return t*t*t }
1912+function B3(t) { return 3*t*t*(1-t) }
1913+function B2(t) { return 3*t*(1-t)*(1-t) }
1914+function B1(t) { return (1-t)*(1-t)*(1-t) }
1915+
1916+var getBezier = function(percent,C1,C2,C3,C4) {
1917+ var pos = new coord();
1918+ pos.x = C1.x*B1(percent) + C2.x*B2(percent) + C3.x*B3(percent) + C4.x*B4(percent);
1919+ pos.y = C1.y*B1(percent) + C2.y*B2(percent) + C3.y*B3(percent) + C4.y*B4(percent);
1920+ return pos;
1921+}
1922
1923=== renamed file 'qml/Stages/DesktopStage.qml' => 'qml/Stage/Stage.qml'
1924--- qml/Stages/DesktopStage.qml 2016-09-07 08:36:59 +0000
1925+++ qml/Stage/Stage.qml 2016-10-05 14:03:04 +0000
1926@@ -22,75 +22,152 @@
1927 import Utils 0.1
1928 import Ubuntu.Gestures 0.1
1929 import GlobalShortcut 1.0
1930+import GSettings 1.0
1931+import "Spread"
1932+import "Spread/MathUtils.js" as MathUtils
1933
1934-AbstractStage {
1935+FocusScope {
1936 id: root
1937 anchors.fill: parent
1938- paintBackground: false
1939-
1940- // functions to be called from outside
1941- function updateFocusedAppOrientation() { /* TODO */ }
1942- function updateFocusedAppOrientationAnimated() { /* TODO */}
1943- function pushRightEdge(amount) {
1944- if (spread.state === "") {
1945- edgeBarrier.push(amount);
1946- }
1947- }
1948- function closeFocusedDelegate() {
1949- if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
1950- priv.focusedAppDelegate.close();
1951- }
1952- }
1953-
1954- // Used by TutorialRight
1955- property bool spreadShown: spread.state == "altTab"
1956+
1957+ property QtObject applicationManager
1958+ property QtObject topLevelSurfaceList
1959+ property bool altTabPressed
1960+ property url background
1961+ property int dragAreaWidth
1962+ property bool interactive
1963+ property bool keepDashRunning: true
1964+ property real nativeHeight
1965+ property real nativeWidth
1966+ property QtObject orientations
1967+ property int shellOrientation
1968+ property int shellOrientationAngle
1969+ property bool spreadEnabled: true // If false, animations and right edge will be disabled
1970+ property bool suspended
1971+ property int leftMargin: 0
1972+ property bool oskEnabled: false
1973+ property rect inputMethodRect
1974+
1975+ // Configuration
1976+ property string mode: "staged"
1977+ property real leftEdgeDragProgress: 0
1978+
1979+ // Used by the tutorial code
1980+ readonly property bool spreadShown: state == "spread"
1981+ readonly property real rightEdgeDragProgress: rightEdgeDragArea.progress // How far left the stage has been dragged
1982
1983 // used by the snap windows (edge maximize) feature
1984 readonly property alias previewRectangle: fakeRectangle
1985
1986- mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
1987+ readonly property var mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
1988
1989 // application windows never rotate independently
1990- mainAppWindowOrientationAngle: shellOrientationAngle
1991-
1992- orientationChangesEnabled: true
1993-
1994-
1995- itemConfiningMouseCursor: !spreadShown && priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&
1996+ property int mainAppWindowOrientationAngle: shellOrientationAngle
1997+
1998+ property bool orientationChangesEnabled: priv.focusedAppDelegate && priv.focusedAppDelegate.orientationChangesEnabled
1999+
2000+ property int supportedOrientations: {
2001+ if (mainApp) {
2002+ switch (mode) {
2003+ case "staged":
2004+ return mainApp.supportedOrientations;
2005+ case "stagedWithSideStage":
2006+ var orientations = mainApp.supportedOrientations;
2007+ orientations |= Qt.LandscapeOrientation | Qt.InvertedLandscapeOrientation;
2008+ if (priv.sideStageItemId) {
2009+ // If we have a sidestage app, support Portrait orientation
2010+ // so that it will switch the sidestage app to mainstage on rotate to portrait
2011+ orientations |= Qt.PortraitOrientation|Qt.InvertedPortraitOrientation;
2012+ }
2013+ return orientations;
2014+ }
2015+ }
2016+
2017+ return Qt.PortraitOrientation |
2018+ Qt.LandscapeOrientation |
2019+ Qt.InvertedPortraitOrientation |
2020+ Qt.InvertedLandscapeOrientation;
2021+ }
2022+
2023+
2024+ onAltTabPressedChanged: priv.goneToSpread = altTabPressed
2025+
2026+ property Item itemConfiningMouseCursor: !spreadShown && priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&
2027 priv.focusedAppDelegate.surface.confinesMousePointer ?
2028 priv.focusedAppDelegate.clientAreaItem : null;
2029
2030+ signal itemSnapshotRequested(Item item)
2031+
2032+ // functions to be called from outside
2033+ function updateFocusedAppOrientation() { /* TODO */ }
2034+ function updateFocusedAppOrientationAnimated() { /* TODO */}
2035+ function pushRightEdge(amount) {
2036+ edgeBarrier.push(amount);
2037+ }
2038+
2039+ onSpreadEnabledChanged: {
2040+ if (!spreadEnabled && root.state == "spread") {
2041+ priv.goneToSpread = false;
2042+ }
2043+ }
2044+
2045+ GSettings {
2046+ id: lifecycleExceptions
2047+ schema.id: "com.canonical.qtmir"
2048+ }
2049+
2050+ function isExemptFromLifecycle(appId) {
2051+ var shortAppId = appId.split('_')[0];
2052+ for (var i = 0; i < lifecycleExceptions.lifecycleExemptAppids.length; i++) {
2053+ if (shortAppId === lifecycleExceptions.lifecycleExemptAppids[i]) {
2054+ return true;
2055+ }
2056+ }
2057+ return false;
2058+ }
2059+
2060+ GlobalShortcut {
2061+ id: closeFocusedShortcut
2062+ shortcut: Qt.AltModifier|Qt.Key_F4
2063+ onTriggered: {
2064+ if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
2065+ priv.focusedAppDelegate.close();
2066+ }
2067+ }
2068+ }
2069+
2070 GlobalShortcut {
2071 id: showSpreadShortcut
2072 shortcut: Qt.MetaModifier|Qt.Key_W
2073- onTriggered: spread.state = "altTab"
2074+ onTriggered: priv.goneToSpread = true
2075 }
2076
2077 GlobalShortcut {
2078 id: minimizeAllShortcut
2079 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_D
2080 onTriggered: priv.minimizeAllWindows()
2081+ active: root.state == "windowed"
2082 }
2083
2084 GlobalShortcut {
2085 id: maximizeWindowShortcut
2086 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Up
2087 onTriggered: priv.focusedAppDelegate.maximize()
2088- active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximized
2089+ active: root.state == "windowed" && priv.focusedAppDelegate && priv.focusedAppDelegate.canBeMaximized
2090 }
2091
2092 GlobalShortcut {
2093 id: maximizeWindowLeftShortcut
2094 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Left
2095 onTriggered: priv.focusedAppDelegate.maximizeLeft()
2096- active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximizedLeftRight
2097+ active: root.state == "windowed" && priv.focusedAppDelegate && priv.focusedAppDelegate.canBeMaximizedLeftRight
2098 }
2099
2100 GlobalShortcut {
2101 id: maximizeWindowRightShortcut
2102 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Right
2103 onTriggered: priv.focusedAppDelegate.maximizeRight()
2104- active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximizedLeftRight
2105+ active: root.state == "windowed" && priv.focusedAppDelegate && priv.focusedAppDelegate.canBeMaximizedLeftRight
2106 }
2107
2108 GlobalShortcut {
2109@@ -98,7 +175,7 @@
2110 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Down
2111 onTriggered: priv.focusedAppDelegate.anyMaximized
2112 ? priv.focusedAppDelegate.restoreFromMaximized() : priv.focusedAppDelegate.minimize()
2113- active: priv.focusedAppDelegate !== null
2114+ active: root.state == "windowed" && priv.focusedAppDelegate
2115 }
2116
2117 GlobalShortcut {
2118@@ -107,28 +184,17 @@
2119 active: priv.focusedAppDelegate !== null
2120 }
2121
2122- Connections {
2123- target: root.topLevelSurfaceList
2124- onCountChanged: {
2125- if (spread.state == "altTab") {
2126- spread.cancel();
2127- }
2128- }
2129- }
2130-
2131 QtObject {
2132 id: priv
2133 objectName: "DesktopStagePrivate"
2134
2135 property var focusedAppDelegate: null
2136- onFocusedAppDelegateChanged: {
2137- if (spread.state == "altTab") {
2138- spread.state = "";
2139- }
2140- }
2141-
2142 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
2143
2144+ property bool goneToSpread: false
2145+ property int closingIndex: -1
2146+ property int animationDuration: UbuntuAnimation.FastDuration
2147+
2148 function updateForegroundMaximizedApp() {
2149 var found = false;
2150 for (var i = 0; i < appRepeater.count && !found; i++) {
2151@@ -162,11 +228,87 @@
2152 }
2153 }
2154
2155- readonly property real virtualKeyboardHeight: SurfaceManager.inputMethodSurface
2156- ? SurfaceManager.inputMethodSurface.inputBounds.height
2157- : 0
2158+ readonly property bool sideStageEnabled: root.mode === "stagedWithSideStage" &&
2159+ (root.shellOrientation == Qt.LandscapeOrientation ||
2160+ root.shellOrientation == Qt.InvertedLandscapeOrientation)
2161+
2162+ property var mainStageDelegate: null
2163+ property var sideStageDelegate: null
2164+ property int mainStageItemId: 0
2165+ property int sideStageItemId: 0
2166+ property string mainStageAppId: ""
2167+ property string sideStageAppId: ""
2168+
2169+ onSideStageDelegateChanged: {
2170+ if (!sideStageDelegate) {
2171+ sideStage.hide();
2172+ }
2173+ }
2174+
2175+ function updateMainAndSideStageIndexes() {
2176+ if (root.mode != "stagedWithSideStage") {
2177+ priv.sideStageDelegate = null;
2178+ priv.sideStageItemId = 0;
2179+ priv.sideStageAppId = "";
2180+ priv.mainStageDelegate = appRepeater.itemAt(0);
2181+ priv.mainStageAppId = topLevelSurfaceList.idAt(0);
2182+ priv.mainStageAppId = topLevelSurfaceList.applicationAt(0) ? topLevelSurfaceList.applicationAt(0).appId : ""
2183+ return;
2184+ }
2185+
2186+ var choseMainStage = false;
2187+ var choseSideStage = false;
2188+
2189+ if (!root.topLevelSurfaceList)
2190+ return;
2191+
2192+ for (var i = 0; i < appRepeater.count && (!choseMainStage || !choseSideStage); ++i) {
2193+ var appDelegate = appRepeater.itemAt(i);
2194+ if (sideStage.shown && appDelegate.stage == ApplicationInfoInterface.SideStage
2195+ && !choseSideStage) {
2196+ priv.sideStageDelegate = appDelegate
2197+ priv.sideStageItemId = root.topLevelSurfaceList.idAt(i);
2198+ priv.sideStageAppId = root.topLevelSurfaceList.applicationAt(i).appId;
2199+ choseSideStage = true;
2200+ } else if (!choseMainStage && appDelegate.stage == ApplicationInfoInterface.MainStage) {
2201+ priv.mainStageDelegate = appDelegate;
2202+ priv.mainStageItemId = root.topLevelSurfaceList.idAt(i);
2203+ priv.mainStageAppId = root.topLevelSurfaceList.applicationAt(i).appId;
2204+ choseMainStage = true;
2205+ }
2206+ }
2207+ if (!choseMainStage && priv.mainStageDelegate) {
2208+ priv.mainStageDelegate = null;
2209+ priv.mainStageItemId = 0;
2210+ priv.mainStageAppId = "";
2211+ }
2212+ if (!choseSideStage && priv.sideStageDelegate) {
2213+ priv.sideStageDelegate = null;
2214+ priv.sideStageItemId = 0;
2215+ priv.sideStageAppId = "";
2216+ }
2217+ }
2218+
2219+ property int nextInStack: {
2220+ var mainStageIndex = priv.mainStageDelegate ? priv.mainStageDelegate.itemIndex : -1;
2221+ var sideStageIndex = priv.sideStageDelegate ? priv.sideStageDelegate.itemIndex : -1;
2222+ if (sideStageIndex == -1) {
2223+ return topLevelSurfaceList.count > 1 ? 1 : -1;
2224+ }
2225+ if (mainStageIndex == 0 || sideStageIndex == 0) {
2226+ if (mainStageIndex == 1 || sideStageIndex == 1) {
2227+ return topLevelSurfaceList.count > 2 ? 2 : -1;
2228+ }
2229+ return 1;
2230+ }
2231+ return -1;
2232+ }
2233+
2234+ readonly property real virtualKeyboardHeight: root.inputMethodRect.height
2235 }
2236
2237+ Component.onCompleted: priv.updateMainAndSideStageIndexes();
2238+
2239 Connections {
2240 target: PanelState
2241 onCloseClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.close(); } }
2242@@ -178,14 +320,13 @@
2243 target: PanelState
2244 property: "buttonsVisible"
2245 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized // FIXME for Locally integrated menus
2246- && spread.state == ""
2247 }
2248
2249 Binding {
2250 target: PanelState
2251 property: "title"
2252 value: {
2253- if (priv.focusedAppDelegate !== null && spread.state == "") {
2254+ if (priv.focusedAppDelegate !== null) {
2255 if (priv.focusedAppDelegate.maximized)
2256 return priv.focusedAppDelegate.title
2257 else
2258@@ -199,7 +340,7 @@
2259 Binding {
2260 target: PanelState
2261 property: "dropShadow"
2262- value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null
2263+ value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null && mode == "windowed"
2264 }
2265
2266 Binding {
2267@@ -216,16 +357,34 @@
2268
2269 Instantiator {
2270 model: root.applicationManager
2271- delegate: Binding {
2272- target: model.application
2273- property: "requestedState"
2274-
2275- // TODO: figure out some lifecycle policy, like suspending minimized apps
2276- // if running on a tablet or something.
2277- // TODO: If the device has a dozen suspended apps because it was running
2278- // in staged mode, when it switches to Windowed mode it will suddenly
2279- // resume all those apps at once. We might want to avoid that.
2280- value: ApplicationInfoInterface.RequestedRunning // Always running for now
2281+ delegate: QtObject {
2282+ property var stateBinding: Binding {
2283+ readonly property bool isDash: model.application ? model.application.appId == "unity8-dash" : false
2284+ target: model.application
2285+ property: "requestedState"
2286+
2287+ // TODO: figure out some lifecycle policy, like suspending minimized apps
2288+ // or something if running windowed.
2289+ // TODO: If the device has a dozen suspended apps because it was running
2290+ // in staged mode, when it switches to Windowed mode it will suddenly
2291+ // resume all those apps at once. We might want to avoid that.
2292+ value: root.mode === "windowed"
2293+ || (isDash && root.keepDashRunning)
2294+ || (!root.suspended && model.application && priv.focusedAppDelegate &&
2295+ (priv.focusedAppDelegate.appId === model.application.appId ||
2296+ priv.mainStageAppId === model.application.appId ||
2297+ priv.sideStageAppId === model.application.appId))
2298+ ? ApplicationInfoInterface.RequestedRunning
2299+ : ApplicationInfoInterface.RequestedSuspended
2300+ }
2301+
2302+ property var lifecycleBinding: Binding {
2303+ target: model.application
2304+ property: "exemptFromLifecycle"
2305+ value: model.application
2306+ ? (!model.application.isTouchApp || isExemptFromLifecycle(model.application.appId))
2307+ : false
2308+ }
2309 }
2310 }
2311
2312@@ -236,16 +395,203 @@
2313 when: !appRepeater.startingUp && root.parent
2314 }
2315
2316+ states: [
2317+ State {
2318+ name: "spread"; when: priv.goneToSpread
2319+ PropertyChanges { target: floatingFlickable; enabled: true }
2320+ PropertyChanges { target: spreadItem; focus: true }
2321+ PropertyChanges { target: hoverMouseArea; enabled: true }
2322+ PropertyChanges { target: rightEdgeDragArea; enabled: false }
2323+ PropertyChanges { target: cancelSpreadMouseArea; enabled: true }
2324+ },
2325+ State {
2326+ name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
2327+ },
2328+ State {
2329+ name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
2330+ PropertyChanges {
2331+ target: sideStage
2332+ opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0
2333+ visible: true
2334+ }
2335+ },
2336+ State {
2337+ name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
2338+ },
2339+ State {
2340+ name: "staged"; when: root.mode === "staged"
2341+ },
2342+ State {
2343+ name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
2344+ PropertyChanges { target: triGestureArea; enabled: true }
2345+ PropertyChanges { target: sideStage; visible: true }
2346+ },
2347+ State {
2348+ name: "windowed"; when: root.mode === "windowed"
2349+ }
2350+ ]
2351+ transitions: [
2352+ Transition {
2353+ from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
2354+ PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
2355+ },
2356+ Transition {
2357+ to: "spread"
2358+ PropertyAction { target: spreadItem; property: "highlightedIndex"; value: appRepeater.count > 1 ? 1 : 0 }
2359+ PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
2360+ },
2361+ Transition {
2362+ from: "spread"
2363+ SequentialAnimation {
2364+ ScriptAction {
2365+ script: {
2366+ var item = appRepeater.itemAt(Math.max(0, spreadItem.highlightedIndex));
2367+ if (item.stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
2368+ sideStage.show();
2369+ }
2370+ item.playFocusAnimation();
2371+ }
2372+ }
2373+ PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
2374+ }
2375+ },
2376+ Transition {
2377+ to: "stagedRightEdge"
2378+ PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
2379+ },
2380+ Transition {
2381+ to: "stagedWithSideStage"
2382+ ScriptAction { script: priv.updateMainAndSideStageIndexes(); }
2383+ }
2384+
2385+ ]
2386+
2387+ MouseArea {
2388+ id: cancelSpreadMouseArea
2389+ anchors.fill: parent
2390+ enabled: false
2391+ onClicked: priv.goneToSpread = false
2392+ }
2393+
2394 FocusScope {
2395 id: appContainer
2396 objectName: "appContainer"
2397 anchors.fill: parent
2398- focus: spread.state !== "altTab"
2399+ focus: true
2400
2401 Wallpaper {
2402 id: wallpaper
2403 anchors.fill: parent
2404 source: root.background
2405+ // Make sure it's the lowest item. Due to the left edge drag we sometimes need
2406+ // to put the dash at -1 and we don't want it behind the Wallpaper
2407+ z: -2
2408+ }
2409+
2410+ Spread {
2411+ id: spreadItem
2412+ objectName: "spreadItem"
2413+ anchors.fill: appContainer
2414+ leftMargin: root.leftMargin
2415+ model: root.topLevelSurfaceList
2416+ spreadFlickable: floatingFlickable
2417+ z: 10
2418+
2419+ onLeaveSpread: {
2420+ priv.goneToSpread = false;
2421+ }
2422+ }
2423+
2424+ Connections {
2425+ target: root.topLevelSurfaceList
2426+ onListChanged: priv.updateMainAndSideStageIndexes()
2427+ }
2428+
2429+
2430+ DropArea {
2431+ objectName: "MainStageDropArea"
2432+ anchors {
2433+ left: parent.left
2434+ top: parent.top
2435+ bottom: parent.bottom
2436+ }
2437+ width: appContainer.width - sideStage.width
2438+ enabled: sideStage.enabled
2439+
2440+ onDropped: {
2441+ drop.source.appDelegate.saveStage(ApplicationInfoInterface.MainStage);
2442+ drop.source.appDelegate.focus = true;
2443+ }
2444+ keys: "SideStage"
2445+ }
2446+
2447+ SideStage {
2448+ id: sideStage
2449+ objectName: "sideStage"
2450+ shown: false
2451+ height: appContainer.height
2452+ x: appContainer.width - width
2453+ visible: false
2454+ Behavior on opacity { UbuntuNumberAnimation {} }
2455+ z: {
2456+ if (!priv.mainStageItemId) return 0;
2457+
2458+ if (priv.sideStageItemId && priv.nextInStack > 0) {
2459+
2460+ // Due the order in which bindings are evaluated, this might be triggered while shuffling
2461+ // the list and index doesn't yet match with itemIndex (even though itemIndex: index)
2462+ // Let's walk the list and compare itemIndex to make sure we have the correct one.
2463+ var nextDelegateInStack = -1;
2464+ for (var i = 0; i < appRepeater.count; i++) {
2465+ if (appRepeater.itemAt(i).itemIndex == priv.nextInStack) {
2466+ nextDelegateInStack = appRepeater.itemAt(i);
2467+ break;
2468+ }
2469+ }
2470+
2471+ if (nextDelegateInStack.stage === ApplicationInfoInterface.MainStage) {
2472+ // if the next app in stack is a main stage app, put the sidestage on top of it.
2473+ return 2;
2474+ }
2475+ return 1;
2476+ }
2477+
2478+ return 1;
2479+ }
2480+
2481+ onShownChanged: {
2482+ if (!shown && priv.mainStageDelegate) {
2483+ priv.mainStageDelegate.claimFocus();
2484+ }
2485+ }
2486+
2487+ DropArea {
2488+ id: sideStageDropArea
2489+ objectName: "SideStageDropArea"
2490+ anchors.fill: parent
2491+
2492+ property bool dropAllowed: true
2493+
2494+ onEntered: {
2495+ dropAllowed = drag.keys != "Disabled";
2496+ }
2497+ onExited: {
2498+ dropAllowed = true;
2499+ }
2500+ onDropped: {
2501+ if (drop.keys == "MainStage") {
2502+ drop.source.appDelegate.saveStage(ApplicationInfoInterface.SideStage);
2503+ drop.source.appDelegate.focus = true;
2504+ }
2505+ }
2506+ drag {
2507+ onSourceChanged: {
2508+ if (!sideStageDropArea.drag.source) {
2509+ dropAllowed = true;
2510+ }
2511+ }
2512+ }
2513+ }
2514 }
2515
2516 TopLevelSurfaceRepeater {
2517@@ -256,6 +602,7 @@
2518 delegate: FocusScope {
2519 id: appDelegate
2520 objectName: "appDelegate_" + model.id
2521+ property int itemIndex: index // We need this from outside the repeater
2522 // z might be overriden in some cases by effects, but we need z ordering
2523 // to calculate occlusion detection
2524 property int normalZ: topLevelSurfaceList.count - index
2525@@ -265,10 +612,33 @@
2526 }
2527 }
2528 z: normalZ
2529- x: requestedX // may be overridden in some states. Do not directly write to this.
2530- y: requestedY // may be overridden in some states. Do not directly write to this.
2531- property real requestedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.x + units.gu(3) : (normalZ - 1) * units.gu(3)
2532- property real requestedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.y + units.gu(3) : normalZ * units.gu(3)
2533+
2534+ // Normally we want x/y where we request it to be. Width/height of our delegate will
2535+ // match what the actual surface size is.
2536+ // Don't write to those, they will be set by states
2537+ x: requestedX
2538+ y: requestedY
2539+ width: decoratedWindow.implicitWidth
2540+ height: decoratedWindow.implicitHeight
2541+
2542+ // requestedX/Y/width/height is what we ask the actual surface to be.
2543+ // Do not write to those, they will be set by states
2544+ property real requestedX: windowedX
2545+ property real requestedY: windowedY
2546+ property real requestedWidth: windowedWidth
2547+ property real requestedHeight: windowedHeight
2548+
2549+ // In those are for windowed mode. Those values basically store the window's properties
2550+ // when having a floating window. If you want to move/resize a window in normal mode, this is what you want to write to.
2551+ property real windowedX
2552+ property real windowedY
2553+ property real windowedWidth
2554+ property real windowedHeight
2555+
2556+ // unlike windowedX/Y, this is the last known grab position before being pushed against edges/corners
2557+ // when restoring, the window should return to these, not to the place where it was dropped near the edge
2558+ property real restoredX
2559+ property real restoredY
2560
2561 Binding {
2562 target: appDelegate
2563@@ -277,27 +647,24 @@
2564 Math.min(appDelegate.requestedY - PanelState.panelHeight,
2565 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
2566 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
2567- && SurfaceManager.inputMethodSurface
2568- && SurfaceManager.inputMethodSurface.state != Mir.HiddenState
2569- && SurfaceManager.inputMethodSurface.state != Mir.MinimizedState
2570+ && root.inputMethodRect.height > 0
2571
2572 }
2573
2574- width: decoratedWindow.width
2575- height: decoratedWindow.height
2576+ Behavior on x { id: xBehavior; enabled: priv.closingIndex >= 0; UbuntuNumberAnimation { onRunningChanged: if (!running) priv.closingIndex = -1} }
2577
2578 Connections {
2579 target: root
2580 onShellOrientationAngleChanged: {
2581 // at this point decoratedWindow.surfaceOrientationAngle is the old shellOrientationAngle
2582 if (application && application.rotatesWindowContents) {
2583- if (state == "normal" || state == "restored") {
2584+ if (root.state == "windowed") {
2585 var angleDiff = decoratedWindow.surfaceOrientationAngle - shellOrientationAngle;
2586 angleDiff = (360 + angleDiff) % 360;
2587 if (angleDiff === 90 || angleDiff === 270) {
2588 var aux = decoratedWindow.requestedHeight;
2589- decoratedWindow.requestedHeight = decoratedWindow.requestedWidth + decoratedWindow.visibleDecorationHeight;
2590- decoratedWindow.requestedWidth = aux - decoratedWindow.visibleDecorationHeight;
2591+ decoratedWindow.requestedHeight = decoratedWindow.requestedWidth + decoratedWindow.decorationHeight;
2592+ decoratedWindow.requestedWidth = aux - decoratedWindow.decorationHeight;
2593 }
2594 }
2595 decoratedWindow.surfaceOrientationAngle = shellOrientationAngle;
2596@@ -306,6 +673,10 @@
2597 }
2598 }
2599 }
2600+ Connections {
2601+ target: priv
2602+ onSideStageEnabledChanged: refreshStage()
2603+ }
2604
2605 readonly property alias application: decoratedWindow.application
2606 readonly property alias minimumWidth: decoratedWindow.minimumWidth
2607@@ -314,8 +685,6 @@
2608 readonly property alias maximumHeight: decoratedWindow.maximumHeight
2609 readonly property alias widthIncrement: decoratedWindow.widthIncrement
2610 readonly property alias heightIncrement: decoratedWindow.heightIncrement
2611- property int requestedWidth: -1
2612- property int requestedHeight: -1
2613
2614 readonly property bool maximized: windowState === WindowStateStorage.WindowStateMaximized
2615 readonly property bool maximizedLeft: windowState === WindowStateStorage.WindowStateMaximizedLeft
2616@@ -330,7 +699,7 @@
2617 maximizedTopLeft || maximizedTopRight || maximizedBottomLeft || maximizedBottomRight
2618
2619 readonly property bool minimized: windowState & WindowStateStorage.WindowStateMinimized
2620- readonly property alias fullscreen: decoratedWindow.fullscreen
2621+ readonly property bool fullscreen: surface ? surface.state === Mir.FullscreenState : application.fullscreen
2622
2623 readonly property bool canBeMaximized: canBeMaximizedHorizontally && canBeMaximizedVertically
2624 readonly property bool canBeMaximizedLeftRight: (maximumWidth == 0 || maximumWidth >= appContainer.width/2) &&
2625@@ -339,6 +708,7 @@
2626 (maximumHeight == 0 || maximumHeight >= appContainer.height/2)
2627 readonly property bool canBeMaximizedHorizontally: maximumWidth == 0 || maximumWidth >= appContainer.width
2628 readonly property bool canBeMaximizedVertically: maximumHeight == 0 || maximumHeight >= appContainer.height
2629+ readonly property alias orientationChangesEnabled: decoratedWindow.orientationChangesEnabled
2630
2631 property int windowState: WindowStateStorage.WindowStateNormal
2632 property bool animationsEnabled: true
2633@@ -347,23 +717,45 @@
2634 property bool visuallyMaximized: false
2635 property bool visuallyMinimized: false
2636
2637+ property int stage: ApplicationInfoInterface.MainStage
2638+ function saveStage(newStage) {
2639+ appDelegate.stage = newStage;
2640+ WindowStateStorage.saveStage(appId, newStage);
2641+ priv.updateMainAndSideStageIndexes()
2642+ }
2643+
2644 readonly property var surface: model.surface
2645 readonly property alias resizeArea: resizeArea
2646 readonly property alias focusedSurface: decoratedWindow.focusedSurface
2647 readonly property bool dragging: touchControls.overlayShown ? touchControls.dragging : decoratedWindow.dragging
2648
2649- readonly property bool isDash: model.application.appId == "unity8-dash"
2650+ readonly property string appId: model.application.appId
2651+ readonly property bool isDash: appId == "unity8-dash"
2652 readonly property alias clientAreaItem: decoratedWindow.clientAreaItem
2653
2654 function claimFocus() {
2655- if (spread.state == "altTab") {
2656- spread.cancel();
2657- }
2658- appDelegate.restore(true /* animated */, appDelegate.windowState);
2659+ if (root.state == "spread") {
2660+ spreadItem.highlightedIndex = index
2661+ priv.goneToSpread = false;
2662+ }
2663+ if (root.mode == "stagedWithSideStage") {
2664+ if (appDelegate.stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
2665+ sideStage.show();
2666+ }
2667+ priv.updateMainAndSideStageIndexes();
2668+ }
2669+
2670+ if (root.mode == "windowed") {
2671+ appDelegate.restore(true /* animated */, appDelegate.windowState);
2672+ } else {
2673+ appDelegate.focus = true;
2674+ }
2675 }
2676 Connections {
2677 target: model.surface
2678- onFocusRequested: claimFocus();
2679+ onFocusRequested: {
2680+ claimFocus();
2681+ }
2682 }
2683 Connections {
2684 target: model.application
2685@@ -383,14 +775,9 @@
2686 return;
2687
2688 if (focus) {
2689- // If we're orphan (!parent) it means this stage is no longer the current one
2690- // and will be deleted shortly. So we should no longer have a say over the model
2691- if (root.parent) {
2692- topLevelSurfaceList.raiseId(model.id);
2693- }
2694-
2695+ topLevelSurfaceList.raiseId(model.id);
2696 priv.focusedAppDelegate = appDelegate;
2697- } else if (!focus && priv.focusedAppDelegate === appDelegate) {
2698+ } else if (!focus && priv.focusedAppDelegate === appDelegate && root.state != "spread") {
2699 priv.focusedAppDelegate = null;
2700 // FIXME: No idea why the Binding{} doens't update when focusedAppDelegate turns null
2701 MirFocusController.focusedSurface = null;
2702@@ -403,13 +790,25 @@
2703 decoratedWindow.surfaceOrientationAngle = 0;
2704 }
2705
2706+ // First, cascade the newly created window, relative to the currently/old focused window.
2707+ windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
2708+ windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
2709+ // Now load any saved state. This needs to happen *after* the cascading!
2710+ resizeArea.loadWindowState();
2711+
2712 // NB: We're differentiating if this delegate was created in response to a new entry in the model
2713 // or if the Repeater is just populating itself with delegates to match the model it received.
2714 if (!appRepeater.startingUp) {
2715 // a top level window is always the focused one when it first appears, unfocusing
2716 // any preexisting one
2717- focus = true;
2718+ if (root.state == "spread") {
2719+ spreadItem.highlightedIndex = index;
2720+ }
2721+ claimFocus();
2722 }
2723+
2724+ refreshStage();
2725+ _constructing = false;
2726 }
2727 Component.onDestruction: {
2728 if (!root.parent) {
2729@@ -435,13 +834,20 @@
2730
2731 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
2732
2733+ property bool _constructing: true;
2734+ onStageChanged: {
2735+ if (!_constructing) {
2736+ priv.updateMainAndSideStageIndexes();
2737+ }
2738+ }
2739+
2740 visible: (
2741 !visuallyMinimized
2742 && !greeter.fullyShown
2743 && (priv.foregroundMaximizedAppDelegate === null || priv.foregroundMaximizedAppDelegate.normalZ <= z)
2744 )
2745- || decoratedWindow.fullscreen
2746- || (spread.state == "altTab" && index === spread.highlightedIndex)
2747+ || appDelegate.fullscreen
2748+ || focusAnimation.running || rightEdgeFocusAnimation.running || hidingAnimation.running
2749
2750 function close() {
2751 model.surface.close();
2752@@ -499,7 +905,44 @@
2753 }
2754
2755 function playFocusAnimation() {
2756- focusAnimation.start()
2757+ if (state == "stagedRightEdge") {
2758+ // TODO: Can we drop this if and find something that always works?
2759+ if (root.mode == "staged") {
2760+ rightEdgeFocusAnimation.targetX = 0
2761+ rightEdgeFocusAnimation.start()
2762+ } else if (root.mode == "stagedWithSideStage") {
2763+ rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
2764+ rightEdgeFocusAnimation.start()
2765+ }
2766+ } else if (state == "windowedRightEdge" || state == "windowed") {
2767+ claimFocus();
2768+ } else {
2769+ focusAnimation.start()
2770+ }
2771+ }
2772+ function playHidingAnimation() {
2773+ if (state != "windowedRightEdge") {
2774+ hidingAnimation.start()
2775+ }
2776+ }
2777+
2778+ function refreshStage() {
2779+ var newStage = ApplicationInfoInterface.MainStage;
2780+ if (priv.sideStageEnabled) { // we're in lanscape rotation.
2781+ if (!isDash && application && application.supportedOrientations & (Qt.PortraitOrientation|Qt.InvertedPortraitOrientation)) {
2782+ var defaultStage = ApplicationInfoInterface.SideStage; // if application supports portrait, it defaults to sidestage.
2783+ if (application.supportedOrientations & (Qt.LandscapeOrientation|Qt.InvertedLandscapeOrientation)) {
2784+ // if it supports lanscape, it defaults to mainstage.
2785+ defaultStage = ApplicationInfoInterface.MainStage;
2786+ }
2787+ newStage = WindowStateStorage.getStage(application.appId, defaultStage);
2788+ }
2789+ }
2790+
2791+ stage = newStage;
2792+ if (focus && stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
2793+ sideStage.show();
2794+ }
2795 }
2796
2797 UbuntuNumberAnimation {
2798@@ -509,32 +952,255 @@
2799 from: 0.98
2800 to: 1
2801 duration: UbuntuAnimation.SnapDuration
2802- }
2803-
2804- // unlike requestedX/Y, this is the last known grab position before being pushed against edges/corners
2805- // when restoring, the window should return to these, not to the place where it was dropped near the edge
2806- property real restoredX
2807- property real restoredY
2808+ onStarted: {
2809+ topLevelSurfaceList.raiseId(model.id);
2810+ }
2811+ onStopped: {
2812+ appDelegate.claimFocus();
2813+ }
2814+ }
2815+ ParallelAnimation {
2816+ id: rightEdgeFocusAnimation
2817+ property int targetX: 0
2818+ UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: rightEdgeFocusAnimation.targetX; duration: priv.animationDuration }
2819+ UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
2820+ UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
2821+ onStopped: {
2822+ appDelegate.focus = true
2823+ }
2824+ }
2825+ ParallelAnimation {
2826+ id: hidingAnimation
2827+ UbuntuNumberAnimation { target: appDelegate; property: "opacity"; to: 0; duration: priv.animationDuration }
2828+ onStopped: appDelegate.opacity = 1
2829+ }
2830+
2831+ SpreadMaths {
2832+ id: spreadMaths
2833+ spread: spreadItem
2834+ itemIndex: index
2835+ flickable: floatingFlickable
2836+ }
2837+ StageMaths {
2838+ id: stageMaths
2839+ sceneWidth: root.width
2840+ stage: appDelegate.stage
2841+ thisDelegate: appDelegate
2842+ mainStageDelegate: priv.mainStageDelegate
2843+ sideStageDelegate: priv.sideStageDelegate
2844+ sideStageWidth: sideStage.panelWidth
2845+ sideStageX: sideStage.x
2846+ itemIndex: appDelegate.itemIndex
2847+ nextInStack: priv.nextInStack
2848+ leftEdgeDragProgress: root.leftEdgeDragProgress
2849+ }
2850+
2851+ StagedRightEdgeMaths {
2852+ id: stagedRightEdgeMaths
2853+ sceneWidth: appContainer.width - root.leftMargin
2854+ sceneHeight: appContainer.height
2855+ isMainStageApp: priv.mainStageDelegate == appDelegate
2856+ isSideStageApp: priv.sideStageDelegate == appDelegate
2857+ sideStageWidth: sideStage.width
2858+ sideStageOpen: sideStage.shown
2859+ itemIndex: index
2860+ nextInStack: priv.nextInStack
2861+ progress: 0
2862+ targetHeight: spreadItem.stackHeight
2863+ targetX: spreadMaths.targetX
2864+ startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
2865+ targetY: spreadMaths.targetY
2866+ targetAngle: spreadMaths.targetAngle
2867+ targetScale: spreadMaths.targetScale
2868+ shuffledZ: stageMaths.itemZ
2869+ breakPoint: spreadItem.rightEdgeBreakPoint
2870+ }
2871+
2872+ WindowedRightEdgeMaths {
2873+ id: windowedRightEdgeMaths
2874+ itemIndex: index
2875+ startWidth: appDelegate.requestedWidth
2876+ startHeight: appDelegate.requestedHeight
2877+ targetHeight: spreadItem.stackHeight
2878+ targetX: spreadMaths.targetX
2879+ targetY: spreadMaths.targetY
2880+ normalZ: appDelegate.normalZ
2881+ targetAngle: spreadMaths.targetAngle
2882+ targetScale: spreadMaths.targetScale
2883+ breakPoint: spreadItem.rightEdgeBreakPoint
2884+ }
2885
2886 states: [
2887 State {
2888+ name: "spread"; when: root.state == "spread"
2889+ PropertyChanges {
2890+ target: decoratedWindow;
2891+ showDecoration: false;
2892+ angle: spreadMaths.targetAngle
2893+ itemScale: spreadMaths.targetScale
2894+ scaleToPreviewSize: spreadItem.stackHeight
2895+ scaleToPreviewProgress: 1
2896+ hasDecoration: root.mode === "windowed"
2897+ shadowOpacity: spreadMaths.shadowOpacity
2898+ showHighlight: spreadItem.highlightedIndex === index
2899+ darkening: spreadItem.highlightedIndex >= 0
2900+ anchors.topMargin: dragArea.distance
2901+ }
2902+ PropertyChanges {
2903+ target: appDelegate
2904+ x: spreadMaths.targetX
2905+ y: spreadMaths.targetY
2906+ z: index
2907+ height: spreadItem.spreadItemHeight
2908+ requestedWidth: decoratedWindow.oldRequestedWidth
2909+ requestedHeight: decoratedWindow.oldRequestedHeight
2910+ visible: spreadMaths.itemVisible
2911+ }
2912+ PropertyChanges { target: dragArea; enabled: true }
2913+ PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
2914+ },
2915+ State {
2916+ name: "stagedRightEdge"
2917+ when: (root.mode == "staged" || root.mode == "stagedWithSideStage") && (root.state == "sideStagedRightEdge" || root.state == "stagedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running)
2918+ PropertyChanges {
2919+ target: stagedRightEdgeMaths
2920+ progress: Math.max(edgeBarrier.progress, rightEdgeDragArea.draggedProgress)
2921+ }
2922+ PropertyChanges {
2923+ target: appDelegate
2924+ x: stagedRightEdgeMaths.animatedX
2925+ y: stagedRightEdgeMaths.animatedY
2926+ z: stagedRightEdgeMaths.animatedZ
2927+ height: stagedRightEdgeMaths.animatedHeight
2928+ requestedWidth: decoratedWindow.oldRequestedWidth
2929+ requestedHeight: decoratedWindow.oldRequestedHeight
2930+ visible: appDelegate.x < root.width
2931+ }
2932+ PropertyChanges {
2933+ target: decoratedWindow
2934+ hasDecoration: false
2935+ angle: stagedRightEdgeMaths.animatedAngle
2936+ itemScale: stagedRightEdgeMaths.animatedScale
2937+ scaleToPreviewSize: spreadItem.stackHeight
2938+ scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
2939+ shadowOpacity: .3
2940+ }
2941+ },
2942+ State {
2943+ name: "windowedRightEdge"
2944+ when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || edgeBarrier.progress > 0)
2945+ PropertyChanges {
2946+ target: windowedRightEdgeMaths
2947+ progress: Math.max(rightEdgeDragArea.progress, edgeBarrier.progress)
2948+ }
2949+ PropertyChanges {
2950+ target: appDelegate
2951+ x: windowedRightEdgeMaths.animatedX
2952+ y: windowedRightEdgeMaths.animatedY
2953+ z: windowedRightEdgeMaths.animatedZ
2954+ height: stagedRightEdgeMaths.animatedHeight
2955+ requestedWidth: decoratedWindow.oldRequestedWidth
2956+ requestedHeight: decoratedWindow.oldRequestedHeight
2957+ }
2958+ PropertyChanges {
2959+ target: decoratedWindow
2960+ showDecoration: windowedRightEdgeMaths.decorationHeight
2961+ angle: windowedRightEdgeMaths.animatedAngle
2962+ itemScale: windowedRightEdgeMaths.animatedScale
2963+ scaleToPreviewSize: spreadItem.stackHeight
2964+ scaleToPreviewProgress: windowedRightEdgeMaths.scaleToPreviewProgress
2965+ shadowOpacity: .3
2966+ }
2967+ PropertyChanges {
2968+ target: opacityEffect;
2969+ opacityValue: windowedRightEdgeMaths.opacityMask
2970+ sourceItem: windowedRightEdgeMaths.opacityMask < 1 ? decoratedWindow : null
2971+ }
2972+ },
2973+ State {
2974+ name: "staged"; when: root.state == "staged"
2975+ PropertyChanges {
2976+ target: appDelegate
2977+ x: stageMaths.itemX
2978+ y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
2979+ requestedWidth: appContainer.width
2980+ requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
2981+ visuallyMaximized: true
2982+ visible: appDelegate.x < root.width
2983+ }
2984+ PropertyChanges {
2985+ target: decoratedWindow
2986+ hasDecoration: false
2987+ }
2988+ PropertyChanges {
2989+ target: resizeArea
2990+ enabled: false
2991+ }
2992+ PropertyChanges {
2993+ target: stageMaths
2994+ animateX: !focusAnimation.running && itemIndex !== spreadItem.highlightedIndex
2995+ }
2996+ },
2997+ State {
2998+ name: "stagedWithSideStage"; when: root.state == "stagedWithSideStage"
2999+ PropertyChanges {
3000+ target: stageMaths
3001+ itemIndex: index
3002+ }
3003+ PropertyChanges {
3004+ target: appDelegate
3005+ x: stageMaths.itemX
3006+ y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
3007+ z: stageMaths.itemZ
3008+ requestedWidth: stageMaths.itemWidth
3009+ requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
3010+ visuallyMaximized: true
3011+ visible: appDelegate.x < root.width
3012+ }
3013+ PropertyChanges {
3014+ target: decoratedWindow
3015+ hasDecoration: false
3016+ }
3017+ PropertyChanges {
3018+ target: resizeArea
3019+ enabled: false
3020+ }
3021+ },
3022+ State {
3023+ name: "maximized"; when: appDelegate.windowState == WindowStateStorage.WindowStateMaximized
3024+ PropertyChanges {
3025+ target: appDelegate;
3026+ requestedX: root.leftMargin;
3027+ requestedY: 0;
3028+ visuallyMinimized: false;
3029+ visuallyMaximized: true
3030+ requestedWidth: appContainer.width - root.leftMargin;
3031+ requestedHeight: appContainer.height;
3032+ }
3033+ PropertyChanges { target: touchControls; enabled: true }
3034+ },
3035+ State {
3036 name: "fullscreen"; when: appDelegate.fullscreen && !appDelegate.minimized
3037 PropertyChanges {
3038 target: appDelegate;
3039- x: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? -PanelState.panelHeight : PanelState.panelHeight)
3040- y: rotation == 0 ? -PanelState.panelHeight : (parent.height - height) / 2
3041+ requestedX: 0
3042+ requestedY: 0
3043 requestedWidth: appContainer.width;
3044 requestedHeight: appContainer.height;
3045 }
3046+ PropertyChanges { target: decoratedWindow; hasDecoration: false }
3047 },
3048 State {
3049 name: "normal";
3050 when: appDelegate.windowState == WindowStateStorage.WindowStateNormal
3051 PropertyChanges {
3052- target: appDelegate;
3053- visuallyMinimized: false;
3054+ target: appDelegate
3055+ visuallyMinimized: false
3056 visuallyMaximized: false
3057 }
3058+ PropertyChanges { target: touchControls; enabled: true }
3059+ PropertyChanges { target: resizeArea; enabled: true }
3060+ PropertyChanges { target: decoratedWindow; shadowOpacity: .3}
3061 },
3062 State {
3063 name: "restored";
3064@@ -542,30 +1208,25 @@
3065 extend: "normal"
3066 PropertyChanges {
3067 target: appDelegate;
3068- requestedX: restoredX;
3069- requestedY: restoredY;
3070+ windowedX: restoredX;
3071+ windowedY: restoredY;
3072 }
3073 },
3074 State {
3075- name: "maximized"; when: appDelegate.maximized && !appDelegate.minimized
3076- PropertyChanges {
3077- target: appDelegate;
3078- requestedX: root.leftMargin;
3079- requestedY: 0;
3080- requestedWidth: appContainer.width - root.leftMargin;
3081- requestedHeight: appContainer.height;
3082- visuallyMinimized: false;
3083- visuallyMaximized: true
3084- }
3085+ name: "semiMaximized"
3086+ PropertyChanges { target: touchControls; enabled: true }
3087+ PropertyChanges { target: resizeArea; enabled: true }
3088+ PropertyChanges { target: decoratedWindow; shadowOpacity: .3 }
3089 },
3090 State {
3091 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
3092+ extend: "semiMaximized"
3093 PropertyChanges {
3094 target: appDelegate
3095- requestedX: root.leftMargin
3096- requestedY: PanelState.panelHeight
3097- requestedWidth: (appContainer.width - root.leftMargin)/2
3098- requestedHeight: appContainer.height - PanelState.panelHeight
3099+ windowedX: root.leftMargin
3100+ windowedY: PanelState.panelHeight
3101+ windowedWidth: (appContainer.width - root.leftMargin)/2
3102+ windowedHeight: appContainer.height - PanelState.panelHeight
3103 }
3104 },
3105 State {
3106@@ -573,17 +1234,18 @@
3107 extend: "maximizedLeft"
3108 PropertyChanges {
3109 target: appDelegate;
3110- requestedX: (appContainer.width + root.leftMargin)/2
3111+ windowedX: (appContainer.width + root.leftMargin)/2
3112 }
3113 },
3114 State {
3115 name: "maximizedTopLeft"; when: appDelegate.maximizedTopLeft && !appDelegate.minimized
3116+ extend: "semiMaximized"
3117 PropertyChanges {
3118 target: appDelegate
3119- requestedX: root.leftMargin
3120- requestedY: PanelState.panelHeight
3121- requestedWidth: (appContainer.width - root.leftMargin)/2
3122- requestedHeight: (appContainer.height - PanelState.panelHeight)/2
3123+ windowedX: root.leftMargin
3124+ windowedY: PanelState.panelHeight
3125+ windowedWidth: (appContainer.width - root.leftMargin)/2
3126+ windowedHeight: (appContainer.height - PanelState.panelHeight)/2
3127 }
3128 },
3129 State {
3130@@ -591,17 +1253,18 @@
3131 extend: "maximizedTopLeft"
3132 PropertyChanges {
3133 target: appDelegate
3134- requestedX: (appContainer.width + root.leftMargin)/2
3135+ windowedX: (appContainer.width + root.leftMargin)/2
3136 }
3137 },
3138 State {
3139 name: "maximizedBottomLeft"; when: appDelegate.maximizedBottomLeft && !appDelegate.minimized
3140+ extend: "semiMaximized"
3141 PropertyChanges {
3142 target: appDelegate
3143- requestedX: root.leftMargin
3144- requestedY: (appContainer.height + PanelState.panelHeight)/2
3145- requestedWidth: (appContainer.width - root.leftMargin)/2
3146- requestedHeight: appContainer.height/2
3147+ windowedX: root.leftMargin
3148+ windowedY: (appContainer.height + PanelState.panelHeight)/2
3149+ windowedWidth: (appContainer.width - root.leftMargin)/2
3150+ windowedHeight: appContainer.height/2
3151 }
3152 },
3153 State {
3154@@ -609,35 +1272,52 @@
3155 extend: "maximizedBottomLeft"
3156 PropertyChanges {
3157 target: appDelegate
3158- requestedX: (appContainer.width + root.leftMargin)/2
3159+ windowedX: (appContainer.width + root.leftMargin)/2
3160 }
3161 },
3162 State {
3163 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
3164- PropertyChanges { target: appDelegate; requestedX: root.leftMargin; requestedY: requestedY; requestedWidth: appContainer.width - root.leftMargin }
3165+ extend: "semiMaximized"
3166+ PropertyChanges { target: appDelegate; requestedX: root.leftMargin; requestedY: windowedY;
3167+ requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appDelegate.windowedHeight }
3168 },
3169 State {
3170 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
3171- PropertyChanges { target: appDelegate; requestedX: requestedX; requestedY: PanelState.panelHeight; requestedHeight: appContainer.height - PanelState.panelHeight }
3172+ extend: "semiMaximized"
3173+ PropertyChanges { target: appDelegate; requestedX: windowedX; requestedY: PanelState.panelHeight;
3174+ requestedWidth: appDelegate.windowedWidth; requestedHeight: appContainer.height - PanelState.panelHeight }
3175 },
3176 State {
3177 name: "minimized"; when: appDelegate.minimized
3178 PropertyChanges {
3179- target: appDelegate;
3180- requestedX: -appDelegate.width / 2;
3181- scale: units.gu(5) / appDelegate.width;
3182+ target: appDelegate
3183+ requestedX: -appDelegate.width / 2
3184+ scale: units.gu(5) / appDelegate.width
3185 opacity: 0;
3186- visuallyMinimized: true;
3187+ visuallyMinimized: true
3188 visuallyMaximized: false
3189 }
3190 }
3191 ]
3192 transitions: [
3193 Transition {
3194+ from: "staged,stagedWithSideStage"; to: "normal"
3195+ enabled: appDelegate.animationsEnabled
3196+ PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
3197+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
3198+ },
3199+ Transition {
3200+ from: "normal,maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight";
3201+ to: "staged,stagedWithSideStage"
3202+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
3203+ },
3204+ Transition {
3205+ from: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight,minimized";
3206 to: "normal,restored"
3207 enabled: appDelegate.animationsEnabled
3208 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
3209- UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight" }
3210+ UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,requestedWidth,requestedHeight,windowedWidth,windowedHeight,scale";
3211+ duration: priv.animationDuration }
3212 },
3213 Transition {
3214 to: "minimized"
3215@@ -657,11 +1337,60 @@
3216 }
3217 },
3218 Transition {
3219- to: "*" //maximized and fullscreen
3220+ to: "spread"
3221+ // DecoratedWindow wants the scaleToPreviewSize set before enabling scaleToPreview
3222+ PropertyAction { target: appDelegate; properties: "z,visible" }
3223+ PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
3224+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
3225+ UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle,scaleToPreviewProgress"; duration: priv.animationDuration }
3226+ },
3227+ Transition {
3228+ from: "normal,staged"; to: "stagedWithSideStage"
3229+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
3230+ UbuntuNumberAnimation { target: appDelegate; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration }
3231+ },
3232+ Transition {
3233+ to: "windowedRightEdge"
3234+ ScriptAction {
3235+ script: {
3236+ windowedRightEdgeMaths.startX = appDelegate.requestedX
3237+ windowedRightEdgeMaths.startY = appDelegate.requestedY
3238+
3239+ if (index == 1) {
3240+ var thisRect = { x: appDelegate.windowedX, y: appDelegate.windowedY, width: appDelegate.requestedWidth, height: appDelegate.requestedHeight }
3241+ var otherDelegate = appRepeater.itemAt(0);
3242+ var otherRect = { x: otherDelegate.windowedX, y: otherDelegate.windowedY, width: otherDelegate.requestedWidth, height: otherDelegate.requestedHeight }
3243+ var intersectionRect = MathUtils.intersectionRect(thisRect, otherRect)
3244+ var mappedInterSectionRect = appDelegate.mapFromItem(root, intersectionRect.x, intersectionRect.y)
3245+ opacityEffect.maskX = mappedInterSectionRect.x
3246+ opacityEffect.maskY = mappedInterSectionRect.y
3247+ opacityEffect.maskWidth = intersectionRect.width
3248+ opacityEffect.maskHeight = intersectionRect.height
3249+ }
3250+ }
3251+ }
3252+ },
3253+ Transition {
3254+ from: "stagedRightEdge"; to: "staged"
3255+ enabled: rightEdgeDragArea.cancelled // only transition back to state if the gesture was cancelled, in the other cases we play the focusAnimations.
3256+ SequentialAnimation {
3257+ ParallelAnimation {
3258+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height,width,scale"; duration: priv.animationDuration }
3259+ UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle,scaleToPreviewProgress"; duration: priv.animationDuration }
3260+ }
3261+ // We need to release scaleToPreviewSize at last
3262+ PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
3263+ PropertyAction { target: appDelegate; property: "visible" }
3264+ }
3265+ },
3266+ Transition {
3267+ from: "normal,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
3268+ to: "normal,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
3269 enabled: appDelegate.animationsEnabled
3270- PropertyAction { target: appDelegate; property: "visuallyMinimized" }
3271 SequentialAnimation {
3272- UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight" }
3273+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
3274+ UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,opacity,scale,requestedWidth,requestedHeight,windowedWidth,windowedHeight";
3275+ duration: priv.animationDuration }
3276 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
3277 ScriptAction { script: { fakeRectangle.stop(); } }
3278 }
3279@@ -669,14 +1398,6 @@
3280 ]
3281
3282 Binding {
3283- id: previewBinding
3284- target: appDelegate
3285- property: "z"
3286- value: topLevelSurfaceList.count + 1
3287- when: index == spread.highlightedIndex && spread.ready
3288- }
3289-
3290- Binding {
3291 target: PanelState
3292 property: "buttonsAlwaysVisible"
3293 value: appDelegate && appDelegate.maximized && touchControls.overlayShown
3294@@ -697,26 +1418,15 @@
3295 screenWidth: appContainer.width
3296 screenHeight: appContainer.height
3297 leftMargin: root.leftMargin
3298-
3299- onPressed: { appDelegate.focus = true; }
3300-
3301- Component.onCompleted: {
3302- loadWindowState();
3303- }
3304-
3305- property bool saveStateOnDestruction: true
3306- Connections {
3307- target: root
3308- onStageAboutToBeUnloaded: {
3309- resizeArea.saveWindowState();
3310- resizeArea.saveStateOnDestruction = false;
3311- fullscreenPolicy.active = false;
3312- }
3313- }
3314+ enabled: false
3315+ visible: enabled
3316+
3317+ onPressed: {
3318+ appDelegate.focus = true;
3319+ }
3320+
3321 Component.onDestruction: {
3322- if (saveStateOnDestruction) {
3323- saveWindowState();
3324- }
3325+ saveWindowState();
3326 }
3327 }
3328
3329@@ -729,14 +1439,25 @@
3330 surface: model.surface
3331 active: appDelegate.focus
3332 focus: true
3333+ interactive: root.interactive
3334+ showDecoration: 1
3335 maximizeButtonShown: appDelegate.canBeMaximized
3336 overlayShown: touchControls.overlayShown
3337+ width: implicitWidth
3338+ height: implicitHeight
3339+ highlightSize: windowInfoItem.iconMargin / 2
3340 stageWidth: appContainer.width
3341 stageHeight: appContainer.height
3342
3343 requestedWidth: appDelegate.requestedWidth
3344 requestedHeight: appDelegate.requestedHeight
3345
3346+ property int oldRequestedWidth: -1
3347+ property int oldRequestedHeight: -1
3348+
3349+ onRequestedWidthChanged: oldRequestedWidth = requestedWidth
3350+ onRequestedHeightChanged: oldRequestedHeight = requestedHeight
3351+
3352 onCloseClicked: { appDelegate.close(); }
3353 onMaximizeClicked: appDelegate.anyMaximized ? appDelegate.restoreFromMaximized() : appDelegate.maximize();
3354 onMaximizeHorizontallyClicked: appDelegate.maximizedHorizontally ? appDelegate.restoreFromMaximized() : appDelegate.maximizeHorizontally()
3355@@ -744,11 +1465,34 @@
3356 onMinimizeClicked: appDelegate.minimize()
3357 onDecorationPressed: { appDelegate.focus = true; }
3358 onDecorationReleased: fakeRectangle.commit();
3359+
3360+ property real angle: 0
3361+ property real itemScale: 1
3362+ transform: [
3363+ Scale {
3364+ origin.x: 0
3365+ origin.y: decoratedWindow.implicitHeight / 2
3366+ xScale: decoratedWindow.itemScale
3367+ yScale: decoratedWindow.itemScale
3368+ },
3369+ Rotation {
3370+ origin { x: 0; y: (decoratedWindow.height / 2) }
3371+ axis { x: 0; y: 1; z: 0 }
3372+ angle: decoratedWindow.angle
3373+ }
3374+ ]
3375+ }
3376+
3377+ OpacityMask {
3378+ id: opacityEffect
3379+ anchors.fill: decoratedWindow
3380 }
3381
3382 WindowControlsOverlay {
3383 id: touchControls
3384 target: appDelegate
3385+ enabled: false
3386+ visible: enabled
3387 stageWidth: appContainer.width
3388 stageHeight: appContainer.height
3389
3390@@ -764,9 +1508,89 @@
3391 }
3392
3393 WindowedFullscreenPolicy {
3394- id: fullscreenPolicy
3395- active: true
3396- surface: model.surface
3397+ id: windowedFullscreenPolicy
3398+ active: root.mode == "windowed"
3399+ surface: model.surface
3400+ }
3401+ StagedFullscreenPolicy {
3402+ id: stagedFullscreenPolicy
3403+ active: root.mode == "staged" || root.mode == "stagedWithSideStage"
3404+ surface: model.surface
3405+ }
3406+
3407+ SpreadDelegateInputArea {
3408+ id: dragArea
3409+ objectName: "dragArea"
3410+ anchors.fill: decoratedWindow
3411+ enabled: false
3412+ closeable: !appDelegate.isDash
3413+
3414+ onClicked: {
3415+ spreadItem.highlightedIndex = index;
3416+ if (distance == 0) {
3417+ priv.goneToSpread = false;
3418+ }
3419+ }
3420+ onClose: {
3421+ priv.closingIndex = index
3422+ if (model.surface) { // could be stopped by OOM
3423+ model.surface.close()
3424+ } else if (model.application) {
3425+ root.applicationManager.stopApplication(model.application.appId);
3426+ }
3427+ }
3428+ }
3429+
3430+ WindowInfoItem {
3431+ id: windowInfoItem
3432+ objectName: "windowInfoItem"
3433+ anchors { left: parent.left; top: decoratedWindow.bottom; topMargin: units.gu(1) }
3434+ title: model.application.name
3435+ iconSource: model.application.icon
3436+ height: spreadItem.appInfoHeight
3437+ opacity: 0
3438+ z: 1
3439+ visible: opacity > 0
3440+ maxWidth: {
3441+ var nextApp = appRepeater.itemAt(index + 1);
3442+ if (nextApp) {
3443+ return nextApp.x - appDelegate.x - units.gu(1)
3444+ }
3445+ return appDelegate.width;
3446+ }
3447+
3448+ onClicked: {
3449+ spreadItem.highlightedIndex = index;
3450+ priv.goneToSpread = false;
3451+ }
3452+ }
3453+
3454+ Image {
3455+ id: closeImage
3456+ anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 + spreadMaths.closeIconOffset }
3457+ source: "graphics/window-close.svg"
3458+ readonly property var mousePos: hoverMouseArea.mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
3459+ visible: !appDelegate.isDash && dragArea.distance == 0
3460+ && index == spreadItem.highlightedIndex
3461+ && mousePos.y < (decoratedWindow.height / 3)
3462+ && mousePos.y > -units.gu(4)
3463+ && mousePos.x > -units.gu(4)
3464+ && mousePos.x < (decoratedWindow.width * 2 / 3)
3465+ height: units.gu(2)
3466+ width: height
3467+ sourceSize.width: width
3468+ sourceSize.height: height
3469+
3470+ MouseArea {
3471+ id: closeMouseArea
3472+ objectName: "closeMouseArea"
3473+ anchors.fill: closeImage
3474+ anchors.margins: -units.gu(2)
3475+ onClicked: {
3476+ priv.closingIndex = index;
3477+ appDelegate.close();
3478+ }
3479+ }
3480 }
3481 }
3482 }
3483@@ -786,7 +1610,8 @@
3484 // NB: it does its own positioning according to the specified edge
3485 edge: Qt.RightEdge
3486
3487- onPassed: { spread.show(); }
3488+ onPassed: priv.goneToSpread = true;
3489+
3490 material: Component {
3491 Item {
3492 Rectangle {
3493@@ -803,23 +1628,248 @@
3494 }
3495 }
3496
3497+ MouseArea {
3498+ id: hoverMouseArea
3499+ objectName: "hoverMouseArea"
3500+ anchors.fill: appContainer
3501+ propagateComposedEvents: true
3502+ hoverEnabled: true
3503+ enabled: false
3504+ visible: enabled
3505+
3506+ property int scrollAreaWidth: width / 3
3507+ property bool progressiveScrollingEnabled: false
3508+
3509+ onMouseXChanged: {
3510+ mouse.accepted = false
3511+
3512+ if (hoverMouseArea.pressed) {
3513+ return;
3514+ }
3515+
3516+ // Find the hovered item and mark it active
3517+ var mapped = mapToItem(appContainer, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
3518+ var itemUnder = appContainer.childAt(mapped.x, mapped.y)
3519+ if (itemUnder) {
3520+ mapped = mapToItem(itemUnder, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
3521+ var delegateChild = itemUnder.childAt(mapped.x, mapped.y)
3522+ if (delegateChild && (delegateChild.objectName === "dragArea" || delegateChild.objectName === "windowInfoItem")) {
3523+ spreadItem.highlightedIndex = appRepeater.indexOf(itemUnder)
3524+ }
3525+ }
3526+
3527+ if (floatingFlickable.contentWidth > floatingFlickable.width) {
3528+ var margins = floatingFlickable.width * 0.05;
3529+
3530+ if (!progressiveScrollingEnabled && mouseX < floatingFlickable.width - scrollAreaWidth) {
3531+ progressiveScrollingEnabled = true
3532+ }
3533+
3534+ // do we need to scroll?
3535+ if (mouseX < scrollAreaWidth + margins) {
3536+ var progress = Math.min(1, (scrollAreaWidth + margins - mouseX) / (scrollAreaWidth - margins));
3537+ var contentX = (1 - progress) * (floatingFlickable.contentWidth - floatingFlickable.width)
3538+ floatingFlickable.contentX = Math.max(0, Math.min(floatingFlickable.contentX, contentX))
3539+ }
3540+ if (mouseX > floatingFlickable.width - scrollAreaWidth && progressiveScrollingEnabled) {
3541+ var progress = Math.min(1, (mouseX - (floatingFlickable.width - scrollAreaWidth)) / (scrollAreaWidth - margins))
3542+ var contentX = progress * (floatingFlickable.contentWidth - floatingFlickable.width)
3543+ floatingFlickable.contentX = Math.min(floatingFlickable.contentWidth - floatingFlickable.width, Math.max(floatingFlickable.contentX, contentX))
3544+ }
3545+ }
3546+ }
3547+
3548+ onPressed: mouse.accepted = false
3549+ }
3550+
3551+ FloatingFlickable {
3552+ id: floatingFlickable
3553+ objectName: "spreadFlickable"
3554+ anchors.fill: appContainer
3555+ enabled: false
3556+ contentWidth: spreadItem.spreadTotalWidth
3557+
3558+ function snap(toIndex) {
3559+ var delegate = appRepeater.itemAt(toIndex)
3560+ var targetContentX = floatingFlickable.contentWidth / spreadItem.totalItemCount * toIndex;
3561+ if (targetContentX - floatingFlickable.contentX > spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) {
3562+ var offset = (spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) - (targetContentX - floatingFlickable.contentX)
3563+ snapAnimation.to = floatingFlickable.contentX - offset;
3564+ snapAnimation.start();
3565+ } else if (targetContentX - floatingFlickable.contentX < spreadItem.leftStackXPos + units.gu(1)) {
3566+ var offset = (spreadItem.leftStackXPos + units.gu(1)) - (targetContentX - floatingFlickable.contentX);
3567+ snapAnimation.to = floatingFlickable.contentX - offset;
3568+ snapAnimation.start();
3569+ }
3570+ }
3571+ UbuntuNumberAnimation {id: snapAnimation; target: floatingFlickable; property: "contentX"}
3572+ }
3573+
3574+ PropertyAnimation {
3575+ id: shortRightEdgeSwipeAnimation
3576+ property: "x"
3577+ to: 0
3578+ duration: priv.animationDuration
3579+ }
3580+
3581 SwipeArea {
3582+ id: rightEdgeDragArea
3583+ objectName: "rightEdgeDragArea"
3584 direction: Direction.Leftwards
3585 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
3586- width: units.gu(1)
3587- onDraggingChanged: { if (dragging) { spread.show(); } }
3588+ width: root.dragAreaWidth
3589+
3590+ property var gesturePoints: []
3591+ property bool cancelled: false
3592+
3593+ property real progress: dragging ? -touchPosition.x / root.width : 0
3594+ onProgressChanged: {
3595+ if (dragging) {
3596+ draggedProgress = progress;
3597+ }
3598+ }
3599+
3600+ property real draggedProgress: 0
3601+
3602+ onTouchPositionChanged: {
3603+ gesturePoints.push(touchPosition.x);
3604+ if (gesturePoints.length > 10) {
3605+ gesturePoints.splice(0, gesturePoints.length - 10)
3606+ }
3607+ }
3608+
3609+ onDraggingChanged: {
3610+ if (dragging) {
3611+ // A potential edge-drag gesture has started. Start recording it
3612+ gesturePoints = [];
3613+ cancelled = false;
3614+ draggedProgress = 0;
3615+ } else {
3616+ // Ok. The user released. Did he drag far enough to go to full spread?
3617+ if (gesturePoints[gesturePoints.length - 1] < -spreadItem.rightEdgeBreakPoint * spreadItem.width ) {
3618+
3619+ // He dragged far enough, but if the last movement was a flick to the right again, he wants to cancel the spread again.
3620+ var oneWayFlickToRight = true;
3621+ var smallestX = gesturePoints[0]-1;
3622+ for (var i = 0; i < gesturePoints.length; i++) {
3623+ if (gesturePoints[i] <= smallestX) {
3624+ oneWayFlickToRight = false;
3625+ break;
3626+ }
3627+ smallestX = gesturePoints[i];
3628+ }
3629+
3630+ if (!oneWayFlickToRight) {
3631+ // Ok, the user made it, let's go to spread!
3632+ priv.goneToSpread = true;
3633+ } else {
3634+ cancelled = true;
3635+ }
3636+ } else {
3637+ // Ok, the user didn't drag far enough to cross the breakPoint
3638+ // Find out if it was a one-way movement to the left, in which case we just switch directly to next app.
3639+ var oneWayFlick = true;
3640+ var smallestX = rightEdgeDragArea.width;
3641+ for (var i = 0; i < gesturePoints.length; i++) {
3642+ if (gesturePoints[i] >= smallestX) {
3643+ oneWayFlick = false;
3644+ break;
3645+ }
3646+ smallestX = gesturePoints[i];
3647+ }
3648+
3649+ if (appRepeater.count > 1 &&
3650+ (oneWayFlick && rightEdgeDragArea.distance > units.gu(2) || rightEdgeDragArea.distance > spreadItem.rightEdgeBreakPoint * spreadItem.width)) {
3651+ var nextStage = appRepeater.itemAt(priv.nextInStack).stage
3652+ for (var i = 0; i < appRepeater.count; i++) {
3653+ if (i != priv.nextInStack && appRepeater.itemAt(i).stage == nextStage) {
3654+ appRepeater.itemAt(i).playHidingAnimation()
3655+ break;
3656+ }
3657+ }
3658+ appRepeater.itemAt(priv.nextInStack).playFocusAnimation()
3659+ if (appRepeater.itemAt(priv.nextInStack).stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
3660+ sideStage.show();
3661+ }
3662+
3663+ } else {
3664+ cancelled = true;
3665+ }
3666+
3667+ gesturePoints = [];
3668+ }
3669+ }
3670+ }
3671 }
3672
3673- DesktopSpread {
3674- id: spread
3675- objectName: "spread"
3676- anchors.fill: appContainer
3677- workspace: appContainer
3678- focus: state == "altTab"
3679- altTabPressed: root.altTabPressed
3680-
3681- onPlayFocusAnimation: {
3682- appRepeater.itemAt(index).playFocusAnimation();
3683+ TabletSideStageTouchGesture {
3684+ id: triGestureArea
3685+ objectName: "triGestureArea"
3686+ anchors.fill: parent
3687+ enabled: false
3688+ property Item appDelegate
3689+
3690+ dragComponent: dragComponent
3691+ dragComponentProperties: { "appDelegate": appDelegate }
3692+
3693+ onPressed: {
3694+ function matchDelegate(obj) { return String(obj.objectName).indexOf("appDelegate") >= 0; }
3695+
3696+ var delegateAtCenter = Functions.itemAt(appContainer, x, y, matchDelegate);
3697+ if (!delegateAtCenter) return;
3698+
3699+ appDelegate = delegateAtCenter;
3700+ }
3701+
3702+ onClicked: {
3703+ if (sideStage.shown) {
3704+ sideStage.hide();
3705+ } else {
3706+ sideStage.show();
3707+ priv.updateMainAndSideStageIndexes()
3708+ }
3709+ }
3710+
3711+ onDragStarted: {
3712+ // If we're dragging to the sidestage.
3713+ if (!sideStage.shown) {
3714+ sideStage.show();
3715+ }
3716+ }
3717+
3718+ Component {
3719+ id: dragComponent
3720+ SurfaceContainer {
3721+ property Item appDelegate
3722+
3723+ surface: appDelegate ? appDelegate.surface : null
3724+
3725+ consumesInput: false
3726+ interactive: false
3727+ focus: false
3728+ requestedWidth: appDelegate.requestedWidth
3729+ requestedHeight: appDelegate.requestedHeight
3730+
3731+ width: units.gu(40)
3732+ height: units.gu(40)
3733+
3734+ Drag.hotSpot.x: width/2
3735+ Drag.hotSpot.y: height/2
3736+ // only accept opposite stage.
3737+ Drag.keys: {
3738+ if (!surface) return "Disabled";
3739+ if (appDelegate.isDash) return "Disabled";
3740+
3741+ if (appDelegate.stage === ApplicationInfo.MainStage) {
3742+ if (appDelegate.application.supportedOrientations
3743+ & (Qt.PortraitOrientation|Qt.InvertedPortraitOrientation)) {
3744+ return "MainStage";
3745+ }
3746+ return "Disabled";
3747+ }
3748+ return "SideStage";
3749+ }
3750+ }
3751 }
3752 }
3753 }
3754
3755=== added file 'qml/Stage/StageMaths.qml'
3756--- qml/Stage/StageMaths.qml 1970-01-01 00:00:00 +0000
3757+++ qml/Stage/StageMaths.qml 2016-10-05 14:03:04 +0000
3758@@ -0,0 +1,79 @@
3759+import QtQuick 2.4
3760+import Unity.Application 0.1
3761+import Ubuntu.Components 1.3
3762+
3763+QtObject {
3764+ id: root
3765+
3766+ // input
3767+ property int itemIndex: 0
3768+ property int nextInStack: 0
3769+ property int sceneWidth: 0
3770+ property int sideStageWidth: 0
3771+ property int sideStageX: sceneWidth
3772+ property bool animateX: false
3773+ property int leftEdgeDragProgress: 0
3774+
3775+ property int stage: ApplicationInfoInterface.MainStage
3776+ property var thisDelegate: null
3777+ property var mainStageDelegate: null
3778+ property var sideStageDelegate: null
3779+
3780+ // output
3781+
3782+ // We need to shuffle z ordering a bit in order to keep side stage apps above main stage apps.
3783+ // We don't want to really reorder them in the model because that allows us to keep track
3784+ // of the last focused order.
3785+ readonly property int itemZ: {
3786+ // only shuffle when we've got a main and side stage
3787+ if (thisDelegate.isDash && thisDelegate != mainStageDelegate && leftEdgeDragProgress > 0) {
3788+ return -1; // Keep the dash behind all other apps for the left edge gesture
3789+ }
3790+
3791+ if (!sideStageDelegate) return itemIndex;
3792+
3793+ // don't shuffle indexes greater than "actives or next"
3794+ if (itemIndex > 2) return itemIndex;
3795+
3796+ if (thisDelegate == mainStageDelegate) {
3797+ // Active main stage always at 0
3798+ return 0;
3799+ }
3800+
3801+ if (nextInStack > 0) {
3802+ var stageOfNextInStack = appRepeater.itemAt(nextInStack).stage;
3803+
3804+ if (itemIndex === nextInStack) {
3805+ // this is the next app in stack.
3806+
3807+ if (stage === ApplicationInfoInterface.SideStage) {
3808+ // if the next app in stack is a sidestage app, it must order on top of other side stage app
3809+ return Math.min(2, topLevelSurfaceList.count-1);
3810+ }
3811+ return 1;
3812+ }
3813+ if (stageOfNextInStack === ApplicationInfoInterface.SideStage) {
3814+ // if the next app in stack is a sidestage app, it must order on top of other side stage app
3815+ return 1;
3816+ }
3817+ return Math.min(2, topLevelSurfaceList.count-1);
3818+ }
3819+ return Math.min(index+1, topLevelSurfaceList.count-1);
3820+ }
3821+
3822+
3823+ property int itemX: {
3824+ if (mainStageDelegate == thisDelegate) {
3825+ return thisDelegate.isDash ? 0 : leftEdgeDragProgress;
3826+ }
3827+ if (sideStageDelegate == thisDelegate) {
3828+ return sideStageX;
3829+ }
3830+ return thisDelegate.isDash && leftEdgeDragProgress > 0 ? 0 : sceneWidth;
3831+ }
3832+ Behavior on itemX { enabled: root.animateX; UbuntuNumberAnimation {} }
3833+
3834+ readonly property int itemWidth: stage == ApplicationInfoInterface.MainStage ?
3835+ sideStageDelegate != null ? sideStageX : sceneWidth :
3836+ stage == ApplicationInfoInterface.SideStage ? sideStageWidth : sceneWidth
3837+}
3838
3839=== modified file 'qml/Stage/SurfaceContainer.qml'
3840--- qml/Stages/SurfaceContainer.qml 2016-05-18 21:58:39 +0000
3841+++ qml/Stage/SurfaceContainer.qml 2016-10-05 14:03:04 +0000
3842@@ -23,6 +23,8 @@
3843 FocusScope {
3844 id: root
3845 objectName: "surfaceContainer"
3846+ implicitWidth: surfaceItem.implicitWidth
3847+ implicitHeight: surfaceItem.implicitHeight
3848
3849 // Must be set from outside
3850 property var surface: null
3851@@ -32,7 +34,6 @@
3852 property int requestedHeight: -1
3853 property bool interactive
3854 property int surfaceOrientationAngle: 0
3855- property bool resizeSurface: true
3856 property bool isPromptSurface: false
3857 // FIME - dont export, use interactive property. Need to fix qtmir to handle consumesInputChanged
3858 // to update surface activeFocus. See mock MirSurfaceItem.
3859@@ -58,35 +59,15 @@
3860 MirSurfaceItem {
3861 id: surfaceItem
3862 objectName: "surfaceItem"
3863+ anchors.fill: parent
3864
3865 focus: true
3866
3867 fillMode: MirSurfaceItem.PadOrCrop
3868 consumesInput: true
3869
3870- surfaceWidth: {
3871- if (root.resizeSurface) {
3872- if (root.requestedWidth >= 0) {
3873- return root.requestedWidth;
3874- } else {
3875- return width;
3876- }
3877- } else {
3878- return -1;
3879- }
3880- }
3881-
3882- surfaceHeight: {
3883- if (root.resizeSurface) {
3884- if (root.requestedHeight >= 0) {
3885- return root.requestedHeight;
3886- } else {
3887- return height;
3888- }
3889- } else {
3890- return -1;
3891- }
3892- }
3893+ surfaceWidth: root.requestedWidth
3894+ surfaceHeight: root.requestedHeight
3895
3896 enabled: root.interactive
3897 antialiasing: !root.interactive
3898@@ -99,34 +80,6 @@
3899 enabled: surfaceItem.enabled
3900 }
3901
3902- // MirSurface size drives SurfaceContainer size
3903- Binding {
3904- target: surfaceItem; property: "width"; value: root.surface ? root.surface.size.width : 0
3905- when: root.requestedWidth >= 0 && root.surface
3906- }
3907- Binding {
3908- target: surfaceItem; property: "height"; value: root.surface ? root.surface.size.height : 0
3909- when: root.requestedHeight >= 0 && root.surface
3910- }
3911- Binding {
3912- target: root; property: "width"; value: surfaceItem.width
3913- when: root.requestedWidth >= 0
3914- }
3915- Binding {
3916- target: root; property: "height"; value: surfaceItem.height
3917- when: root.requestedHeight >= 0
3918- }
3919-
3920- // SurfaceContainer size drives MirSurface size
3921- Binding {
3922- target: surfaceItem; property: "width"; value: root.width
3923- when: root.requestedWidth < 0
3924- }
3925- Binding {
3926- target: surfaceItem; property: "height"; value: root.height
3927- when: root.requestedHeight < 0
3928- }
3929-
3930 Loader {
3931 id: animationsLoader
3932 objectName: "animationsLoader"
3933
3934=== modified file 'qml/Stage/TopLevelSurfaceRepeater.qml'
3935--- qml/Stages/TopLevelSurfaceRepeater.qml 2016-09-07 09:48:56 +0000
3936+++ qml/Stage/TopLevelSurfaceRepeater.qml 2016-10-05 14:03:04 +0000
3937@@ -55,4 +55,13 @@
3938 startingUp = false;
3939 }
3940 }
3941+
3942+ function indexOf(delegateItem) {
3943+ for (var i = 0; i < count; i++) {
3944+ if (itemAt(i) === delegateItem) {
3945+ return i;
3946+ }
3947+ }
3948+ return -1;
3949+ }
3950 }
3951
3952=== modified file 'qml/Stage/WindowDecoration.qml'
3953--- qml/Stages/WindowDecoration.qml 2016-09-22 07:42:18 +0000
3954+++ qml/Stage/WindowDecoration.qml 2016-10-05 14:03:04 +0000
3955@@ -79,7 +79,7 @@
3956 onMaximizeClicked: root.maximizeClicked();
3957 onMaximizeHorizontallyClicked: if (root.target.canBeMaximizedHorizontally) root.maximizeHorizontallyClicked();
3958 onMaximizeVerticallyClicked: if (root.target.canBeMaximizedVertically) root.maximizeVerticallyClicked();
3959- closeButtonShown: root.target.application.appId !== "unity8-dash"
3960+ closeButtonShown: root.target.appId !== "unity8-dash"
3961 }
3962
3963 Label {
3964
3965=== added file 'qml/Stage/WindowInfoItem.qml'
3966--- qml/Stage/WindowInfoItem.qml 1970-01-01 00:00:00 +0000
3967+++ qml/Stage/WindowInfoItem.qml 2016-10-05 14:03:04 +0000
3968@@ -0,0 +1,53 @@
3969+import QtQuick 2.4
3970+import Ubuntu.Components 1.3
3971+
3972+Item {
3973+ id: root
3974+ implicitWidth: Math.max(iconShape.width, titleLabel.width)
3975+ implicitHeight: iconShape.height + titleLabel.height + labelMargin + iconMargin
3976+ property alias title: titleLabel.text
3977+ property alias iconSource: icon.source
3978+
3979+ property real iconHeight: (height - titleLabel.height) * 0.65
3980+ property real iconMargin: (height - titleLabel.height) * 0.25
3981+ property real labelMargin: (height - titleLabel.height) * 0.1
3982+ property int maxWidth: units.gu(10)
3983+
3984+ signal clicked()
3985+
3986+ ProportionalShape {
3987+ id: iconShape
3988+ anchors {
3989+ top: parent.top
3990+ topMargin: iconMargin
3991+ left: parent.left
3992+ }
3993+ height: iconHeight
3994+ borderSource: "undefined"
3995+ aspect: UbuntuShape.Flat
3996+ source: Image {
3997+ id: icon
3998+ sourceSize.width: iconShape.width
3999+ sourceSize.height: iconShape.height
4000+ cache: false // see lpbug#1543290 why no cache
4001+ }
4002+ }
4003+
4004+ MouseArea {
4005+ anchors.fill: iconShape
4006+ onClicked: root.clicked()
4007+ }
4008+
4009+ Label {
4010+ id: titleLabel
4011+ anchors {
4012+ left: iconShape.left
4013+ top: iconShape.bottom
4014+ topMargin: labelMargin
4015+ }
4016+ width: root.maxWidth
4017+ fontSize: 'small'
4018+ color: 'white'
4019+ elide: Label.ElideRight
4020+ }
4021+}
4022
4023=== modified file 'qml/Stage/WindowResizeArea.qml'
4024--- qml/Stages/WindowResizeArea.qml 2016-08-31 13:00:26 +0000
4025+++ qml/Stage/WindowResizeArea.qml 2016-10-05 14:03:04 +0000
4026@@ -75,14 +75,15 @@
4027
4028 function loadWindowState() {
4029 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
4030- Qt.rect(target.requestedX, target.requestedY, defaultWidth, defaultHeight));
4031-
4032- target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
4033- target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
4034+ Qt.rect(target.windowedX, target.windowedY, defaultWidth, defaultHeight));
4035+
4036+
4037+ target.windowedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
4038+ target.windowedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
4039 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });
4040- target.requestedX = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth),
4041+ target.windowedX = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.windowedWidth),
4042 (target.fullscreen ? 0 : root.leftMargin)); });
4043- target.requestedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });
4044+ target.windowedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.windowedHeight), PanelState.panelHeight); });
4045
4046 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
4047 target.restore(false /* animated */, windowState);
4048@@ -111,28 +112,28 @@
4049
4050 readonly property int minimumWidth: root.target ? Math.max(root.minWidth, root.target.minimumWidth) : root.minWidth
4051 onMinimumWidthChanged: {
4052- if (target.requestedWidth < minimumWidth) {
4053- target.requestedWidth = minimumWidth;
4054+ if (target.windowedWidth < minimumWidth) {
4055+ target.windowedWidth = minimumWidth;
4056 }
4057 }
4058 readonly property int minimumHeight: root.target ? Math.max(root.minHeight, root.target.minimumHeight) : root.minHeight
4059 onMinimumHeightChanged: {
4060- if (target.requestedHeight < minimumHeight) {
4061- target.requestedHeight = minimumHeight;
4062+ if (target.windowedHeight < minimumHeight) {
4063+ target.windowedHeight = minimumHeight;
4064 }
4065 }
4066 readonly property int maximumWidth: root.target && root.target.maximumWidth >= minimumWidth && root.target.maximumWidth > 0
4067 ? root.target.maximumWidth : maxSafeInt
4068 onMaximumWidthChanged: {
4069- if (target.requestedWidth > maximumWidth) {
4070- target.requestedWidth = maximumWidth;
4071+ if (target.windowedWidth > maximumWidth) {
4072+ target.windowedWidth = maximumWidth;
4073 }
4074 }
4075 readonly property int maximumHeight: root.target && root.target.maximumHeight >= minimumHeight && root.target.maximumHeight > 0
4076 ? root.target.maximumHeight : maxSafeInt
4077 onMaximumHeightChanged: {
4078- if (target.requestedHeight > maximumHeight) {
4079- target.requestedHeight = maximumHeight;
4080+ if (target.windowedHeight > maximumHeight) {
4081+ target.windowedHeight = maximumHeight;
4082 }
4083 }
4084 readonly property int widthIncrement: {
4085@@ -247,8 +248,8 @@
4086 var pos = mapToItem(root.target.parent, mouseX, mouseY);
4087 d.startMousePosX = pos.x;
4088 d.startMousePosY = pos.y;
4089- d.startX = target.requestedX;
4090- d.startY = target.requestedY;
4091+ d.startX = target.windowedX;
4092+ d.startY = target.windowedY;
4093 d.startWidth = target.width;
4094 d.startHeight = target.height;
4095 d.currentWidth = target.width;
4096@@ -285,53 +286,53 @@
4097
4098 if (d.leftBorder) {
4099 var newTargetX = d.startX + deltaX;
4100- var rightBorderX = target.requestedX + target.width;
4101+ var rightBorderX = target.windowedX + target.width;
4102 if (rightBorderX > newTargetX + d.minimumWidth) {
4103 if (rightBorderX < newTargetX + d.maximumWidth) {
4104- target.requestedWidth = rightBorderX - newTargetX;
4105+ target.windowedWidth = rightBorderX - newTargetX;
4106 } else {
4107- target.requestedWidth = d.maximumWidth;
4108+ target.windowedWidth = d.maximumWidth;
4109 }
4110 } else {
4111- target.requestedWidth = d.minimumWidth;
4112+ target.windowedWidth = d.minimumWidth;
4113 }
4114
4115 } else if (d.rightBorder) {
4116 var newWidth = d.startWidth + deltaX;
4117 if (newWidth > d.minimumWidth) {
4118 if (newWidth < d.maximumWidth) {
4119- target.requestedWidth = newWidth;
4120+ target.windowedWidth = newWidth;
4121 } else {
4122- target.requestedWidth = d.maximumWidth;
4123+ target.windowedWidth = d.maximumWidth;
4124 }
4125 } else {
4126- target.requestedWidth = d.minimumWidth;
4127+ target.windowedWidth = d.minimumWidth;
4128 }
4129 }
4130
4131 if (d.topBorder) {
4132 var newTargetY = Math.max(d.startY + deltaY, PanelState.panelHeight); // disallow resizing up past Panel
4133- var bottomBorderY = target.requestedY + target.height;
4134+ var bottomBorderY = target.windowedY + target.height;
4135 if (bottomBorderY > newTargetY + d.minimumHeight) {
4136 if (bottomBorderY < newTargetY + d.maximumHeight) {
4137- target.requestedHeight = bottomBorderY - newTargetY;
4138+ target.windowedHeight = bottomBorderY - newTargetY;
4139 } else {
4140- target.requestedHeight = d.maximumHeight;
4141+ target.windowedHeight = d.maximumHeight;
4142 }
4143 } else {
4144- target.requestedHeight = d.minimumHeight;
4145+ target.windowedHeight = d.minimumHeight;
4146 }
4147
4148 } else if (d.bottomBorder) {
4149 var newHeight = d.startHeight + deltaY;
4150 if (newHeight > d.minimumHeight) {
4151 if (newHeight < d.maximumHeight) {
4152- target.requestedHeight = newHeight;
4153+ target.windowedHeight = newHeight;
4154 } else {
4155- target.requestedHeight = d.maximumHeight;
4156+ target.windowedHeight = d.maximumHeight;
4157 }
4158 } else {
4159- target.requestedHeight = d.minimumHeight;
4160+ target.windowedHeight = d.minimumHeight;
4161 }
4162 }
4163 }
4164@@ -340,13 +341,13 @@
4165 target: root.target
4166 onWidthChanged: {
4167 if (d.moveLeftBorder) {
4168- target.requestedX += d.currentWidth - target.width;
4169+ target.windowedX += d.currentWidth - target.width;
4170 }
4171 d.currentWidth = target.width;
4172 }
4173 onHeightChanged: {
4174 if (d.moveTopBorder) {
4175- target.requestedY += d.currentHeight - target.height;
4176+ target.windowedY += d.currentHeight - target.height;
4177 }
4178 d.currentHeight = target.height;
4179 }
4180
4181=== removed file 'qml/Stages/AbstractStage.qml'
4182--- qml/Stages/AbstractStage.qml 2016-09-07 08:36:59 +0000
4183+++ qml/Stages/AbstractStage.qml 1970-01-01 00:00:00 +0000
4184@@ -1,93 +0,0 @@
4185-/*
4186- * Copyright (C) 2015-2016 Canonical, Ltd.
4187- *
4188- * This program is free software; you can redistribute it and/or modify
4189- * it under the terms of the GNU General Public License as published by
4190- * the Free Software Foundation; version 3.
4191- *
4192- * This program is distributed in the hope that it will be useful,
4193- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4194- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4195- * GNU General Public License for more details.
4196- *
4197- * You should have received a copy of the GNU General Public License
4198- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4199- */
4200-
4201-import QtQuick 2.4
4202-import Ubuntu.Components 1.3
4203-import GlobalShortcut 1.0
4204-import GSettings 1.0
4205-
4206-FocusScope {
4207- id: root
4208-
4209- // Controls to be set from outside
4210- property QtObject applicationManager
4211- property QtObject topLevelSurfaceList
4212- property bool altTabPressed
4213- property url background
4214- property bool beingResized
4215- property int dragAreaWidth
4216- property real dragProgress // How far left the stage has been dragged, used externally by tutorial code
4217- property bool interactive
4218- property real inverseProgress // This is the progress for left edge drags, in pixels.
4219- property bool keepDashRunning: true
4220- property real maximizedAppTopMargin
4221- property real nativeHeight
4222- property real nativeWidth
4223- property QtObject orientations
4224- property int shellOrientation
4225- property int shellOrientationAngle
4226- property bool spreadEnabled: true // If false, animations and right edge will be disabled
4227- property bool suspended
4228- // A Stage should paint a wallpaper etc over its full size but not use the margins for window placement
4229- property int leftMargin: 0
4230- property alias paintBackground: background.visible
4231- property bool oskEnabled: false
4232-
4233- // To be read from outside
4234- property var mainApp: null
4235- property int mainAppWindowOrientationAngle: 0
4236- property bool orientationChangesEnabled
4237- property int supportedOrientations: Qt.PortraitOrientation
4238- | Qt.LandscapeOrientation
4239- | Qt.InvertedPortraitOrientation
4240- | Qt.InvertedLandscapeOrientation
4241-
4242- property Item itemConfiningMouseCursor: null
4243-
4244-
4245- signal stageAboutToBeUnloaded
4246- signal itemSnapshotRequested(Item item)
4247-
4248- // Shared code for use in stage implementations
4249- GSettings {
4250- id: lifecycleExceptions
4251- schema.id: "com.canonical.qtmir"
4252- }
4253-
4254- function isExemptFromLifecycle(appId) {
4255- var shortAppId = appId.split('_')[0];
4256- for (var i = 0; i < lifecycleExceptions.lifecycleExemptAppids.length; i++) {
4257- if (shortAppId === lifecycleExceptions.lifecycleExemptAppids[i]) {
4258- return true;
4259- }
4260- }
4261- return false;
4262- }
4263-
4264- Rectangle {
4265- id: background
4266- color: "#060606"
4267- anchors.fill: parent
4268- }
4269-
4270- // shared Alt+F4 functionality
4271- function closeFocusedDelegate() {} // to be implemented by stages
4272-
4273- GlobalShortcut {
4274- shortcut: Qt.AltModifier|Qt.Key_F4
4275- onTriggered: closeFocusedDelegate()
4276- }
4277-}
4278
4279=== removed file 'qml/Stages/DesktopSpread.qml'
4280--- qml/Stages/DesktopSpread.qml 2016-06-15 14:08:18 +0000
4281+++ qml/Stages/DesktopSpread.qml 1970-01-01 00:00:00 +0000
4282@@ -1,576 +0,0 @@
4283-/*
4284- * Copyright (C) 2015-2016 Canonical, Ltd.
4285- *
4286- * This program is free software; you can redistribute it and/or modify
4287- * it under the terms of the GNU General Public License as published by
4288- * the Free Software Foundation; version 3.
4289- *
4290- * This program is distributed in the hope that it will be useful,
4291- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4292- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4293- * GNU General Public License for more details.
4294- *
4295- * You should have received a copy of the GNU General Public License
4296- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4297- */
4298-
4299-import QtQuick 2.4
4300-import QtQuick.Layouts 1.1
4301-import Ubuntu.Components 1.3
4302-import Ubuntu.Gestures 0.1
4303-import Unity.Application 0.1
4304-import "../Components"
4305-import Utils 0.1
4306-
4307-FocusScope {
4308- id: root
4309-
4310- property bool altTabPressed: false
4311- property Item workspace: null
4312-
4313- readonly property alias ready: blurLayer.ready
4314- readonly property alias highlightedIndex: spreadRepeater.highlightedIndex
4315-
4316- signal playFocusAnimation(int index)
4317-
4318- function show() {
4319- spreadContainer.animateIn = true;
4320- root.state = "altTab";
4321- }
4322-
4323- onFocusChanged: {
4324- // When the spread comes active, we want to keep focus to the input handler below
4325- // Make sure nothing inside the ApplicationWindow grabs our focus!
4326- if (focus) {
4327- forceActiveFocus();
4328- }
4329- }
4330-
4331- Keys.onPressed: {
4332- switch (event.key) {
4333- case Qt.Key_Left:
4334- case Qt.Key_Backtab:
4335- selectPrevious(event.isAutoRepeat)
4336- event.accepted = true;
4337- break;
4338- case Qt.Key_Right:
4339- case Qt.Key_Tab:
4340- selectNext(event.isAutoRepeat)
4341- event.accepted = true;
4342- break;
4343- case Qt.Key_Escape:
4344- spreadRepeater.highlightedIndex = -1
4345- // Falling through intentionally
4346- case Qt.Key_Enter:
4347- case Qt.Key_Return:
4348- case Qt.Key_Space:
4349- root.state = ""
4350- event.accepted = true;
4351- }
4352- }
4353-
4354- function selectNext(isAutoRepeat) {
4355- if (isAutoRepeat && spreadRepeater.highlightedIndex >= topLevelSurfaceList.count -1) {
4356- return; // AutoRepeat is not allowed to wrap around
4357- }
4358-
4359- spreadRepeater.highlightedIndex = (spreadRepeater.highlightedIndex + 1) % topLevelSurfaceList.count;
4360- var newContentX = ((spreadFlickable.contentWidth) / (topLevelSurfaceList.count + 1)) * Math.max(0, Math.min(topLevelSurfaceList.count - 5, spreadRepeater.highlightedIndex - 3));
4361- if (spreadFlickable.contentX < newContentX || spreadRepeater.highlightedIndex == 0) {
4362- spreadFlickable.snapTo(newContentX)
4363- }
4364- }
4365-
4366- function selectPrevious(isAutoRepeat) {
4367- if (isAutoRepeat && spreadRepeater.highlightedIndex == 0) {
4368- return; // AutoRepeat is not allowed to wrap around
4369- }
4370-
4371- var newIndex = spreadRepeater.highlightedIndex - 1 >= 0 ? spreadRepeater.highlightedIndex - 1 : topLevelSurfaceList.count - 1;
4372- spreadRepeater.highlightedIndex = newIndex;
4373- var newContentX = ((spreadFlickable.contentWidth) / (topLevelSurfaceList.count + 1)) * Math.max(0, Math.min(topLevelSurfaceList.count - 5, spreadRepeater.highlightedIndex - 1));
4374- if (spreadFlickable.contentX > newContentX || newIndex == topLevelSurfaceList.count -1) {
4375- spreadFlickable.snapTo(newContentX)
4376- }
4377- }
4378-
4379- function focusSelected() {
4380- if (spreadRepeater.highlightedIndex != -1) {
4381- if (spreadContainer.visible) {
4382- root.playFocusAnimation(spreadRepeater.highlightedIndex)
4383- }
4384- var surface = topLevelSurfaceList.surfaceAt(spreadRepeater.highlightedIndex);
4385- surface.requestFocus();
4386- }
4387- }
4388-
4389- function cancel() {
4390- spreadRepeater.highlightedIndex = -1;
4391- state = ""
4392- }
4393-
4394- BlurLayer {
4395- id: blurLayer
4396- anchors.fill: parent
4397- source: root.workspace
4398- visible: false
4399- }
4400-
4401- Rectangle {
4402- id: spreadBackground
4403- anchors.fill: parent
4404- color: "#B2000000"
4405- visible: false
4406- opacity: visible ? 1 : 0
4407- Behavior on opacity {
4408- UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
4409- }
4410- }
4411-
4412- MouseArea {
4413- id: eventEater
4414- anchors.fill: parent
4415- visible: spreadBackground.visible
4416- enabled: visible
4417- acceptedButtons: Qt.AllButtons
4418- onWheel: wheel.accepted = true;
4419- }
4420-
4421- Item {
4422- id: spreadContainer
4423- objectName: "spreadContainer"
4424- anchors.fill: parent
4425- visible: false
4426-
4427- property bool animateIn: false
4428-
4429- Repeater {
4430- id: spreadRepeater
4431- objectName: "spreadRepeater"
4432- model: topLevelSurfaceList
4433-
4434- property int highlightedIndex: -1
4435- property int closingIndex: -1
4436-
4437- function indexOf(delegateItem) {
4438- for (var i = 0; i < spreadRepeater.count; i++) {
4439- if (spreadRepeater.itemAt(i) === delegateItem) {
4440- return i;
4441- }
4442- }
4443- return -1;
4444- }
4445-
4446- delegate: Item {
4447- id: spreadDelegate
4448- objectName: "spreadDelegate"
4449- width: units.gu(20)
4450- height: units.gu(20)
4451-
4452- property real angle: 0
4453- property real itemScale: 1
4454- property int itemScaleOriginX: 0
4455- property int itemScaleOriginY: 0
4456-
4457- readonly property string windowTitle: clippedSpreadDelegate.window.title
4458-
4459- Behavior on x {
4460- id: closeBehavior
4461- enabled: spreadRepeater.closingIndex >= 0
4462- UbuntuNumberAnimation {
4463- onRunningChanged: if (!running) spreadRepeater.closingIndex = -1
4464- }
4465- }
4466-
4467- DesktopSpreadDelegate {
4468- id: clippedSpreadDelegate
4469- objectName: "clippedSpreadDelegate"
4470- anchors.left: parent.left
4471- anchors.top: parent.top
4472- application: model.application
4473- surface: model.surface
4474- width: spreadMaths.spreadHeight
4475- height: spreadMaths.spreadHeight
4476-
4477- transform: [
4478- Scale {
4479- origin.x: itemScaleOriginX
4480- origin.y: itemScaleOriginY
4481- xScale: itemScale
4482- yScale: itemScale
4483- },
4484- Rotation {
4485- origin { x: 0; y: (clippedSpreadDelegate.height - (clippedSpreadDelegate.height * itemScale / 2)) }
4486- axis { x: 0; y: 1; z: 0 }
4487- angle: spreadDelegate.angle
4488- }
4489- ]
4490-
4491- MouseArea {
4492- id: spreadSelectArea
4493- anchors.fill: parent
4494- anchors.margins: -units.gu(2)
4495- enabled: false
4496- onClicked: {
4497- spreadRepeater.highlightedIndex = index;
4498- root.state = "";
4499- }
4500- }
4501- }
4502-
4503- SpreadMaths {
4504- id: spreadMaths
4505- flickable: spreadFlickable
4506- itemIndex: index
4507- totalItems: Math.max(6, topLevelSurfaceList.count)
4508- sceneHeight: root.height
4509- itemHeight: spreadDelegate.height
4510- }
4511-
4512- states: [
4513- State {
4514- name: "altTab"; when: root.state == "altTab" && spreadContainer.visible
4515- PropertyChanges {
4516- target: spreadDelegate
4517- x: spreadMaths.animatedX
4518- y: spreadMaths.animatedY + (spreadDelegate.height - clippedSpreadDelegate.height) - units.gu(2)
4519- width: spreadMaths.spreadHeight
4520- height: spreadMaths.sceneHeight
4521- angle: spreadMaths.animatedAngle
4522- itemScale: spreadMaths.scale
4523- itemScaleOriginY: clippedSpreadDelegate.height / 2;
4524- z: index
4525- visible: spreadMaths.itemVisible
4526- }
4527- PropertyChanges {
4528- target: clippedSpreadDelegate
4529- highlightShown: index == spreadRepeater.highlightedIndex
4530- state: "transformed"
4531- shadowOpacity: spreadMaths.shadowOpacity
4532- anchors.topMargin: units.gu(2)
4533- }
4534- PropertyChanges {
4535- target: tileInfo
4536- visible: true
4537- opacity: spreadMaths.tileInfoOpacity
4538- }
4539- PropertyChanges {
4540- target: spreadSelectArea
4541- enabled: true
4542- }
4543- }
4544- ]
4545- transitions: [
4546- Transition {
4547- from: ""
4548- to: "altTab"
4549- SequentialAnimation {
4550- ParallelAnimation {
4551- PropertyAction { target: spreadDelegate; properties: "y,height,width,angle,z,itemScale,itemScaleOriginY,visible" }
4552- PropertyAction { target: clippedSpreadDelegate; properties: "anchors.topMargin" }
4553- PropertyAnimation {
4554- target: spreadDelegate; properties: "x"
4555- from: root.width
4556- duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration :0
4557- easing: UbuntuAnimation.StandardEasing
4558- }
4559- UbuntuNumberAnimation { target: clippedSpreadDelegate; property: "shadowOpacity"; from: 0; to: spreadMaths.shadowOpacity; duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration : 0 }
4560- UbuntuNumberAnimation { target: tileInfo; property: "opacity"; from: 0; to: spreadMaths.tileInfoOpacity; duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration : 0 }
4561- }
4562- PropertyAction { target: spreadSelectArea; property: "enabled" }
4563- }
4564- }
4565- ]
4566-
4567- MouseArea {
4568- id: tileInfo
4569- objectName: "tileInfo"
4570- anchors {
4571- left: parent.left
4572- top: clippedSpreadDelegate.bottom
4573- topMargin: ((spreadMaths.sceneHeight - spreadDelegate.y) - clippedSpreadDelegate.height) * 0.2
4574- }
4575- property int nextItemX: spreadRepeater.count > index + 1 ? spreadRepeater.itemAt(index + 1).x : spreadDelegate.x + units.gu(30)
4576- width: Math.min(units.gu(30), nextItemX - spreadDelegate.x)
4577- height: titleInfoColumn.height
4578- visible: false
4579- hoverEnabled: true
4580-
4581- onContainsMouseChanged: {
4582- if (containsMouse) {
4583- spreadRepeater.highlightedIndex = index
4584- }
4585- }
4586-
4587- onClicked: {
4588- root.state = ""
4589- }
4590-
4591- ColumnLayout {
4592- id: titleInfoColumn
4593- anchors { left: parent.left; top: parent.top; right: parent.right }
4594- spacing: units.gu(1)
4595-
4596- UbuntuShapeForItem {
4597- Layout.preferredHeight: Math.min(units.gu(6), root.height * .05)
4598- Layout.preferredWidth: height * 8 / 7.6
4599- image: Image {
4600- anchors.fill: parent
4601- source: model.application.icon
4602- Rectangle {
4603- anchors.fill: parent
4604- color: "black"
4605- opacity: clippedSpreadDelegate.highlightShown ? 0 : .1
4606- Behavior on opacity {
4607- UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
4608- }
4609- }
4610- }
4611- }
4612- Label {
4613- Layout.fillWidth: true
4614- Layout.preferredHeight: units.gu(6)
4615- text: model.application ? model.application.name : spreadDelegate.windowTitle
4616- wrapMode: Text.WordWrap
4617- elide: Text.ElideRight
4618- maximumLineCount: 2
4619- }
4620- }
4621- }
4622-
4623- Image {
4624- id: closeImage
4625- anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 + spreadMaths.closeIconOffset + units.gu(2) }
4626- source: "graphics/window-close.svg"
4627- readonly property var mousePos: hoverMouseArea.mapToItem(spreadDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
4628- visible: index == spreadRepeater.highlightedIndex
4629- && mousePos.y < (clippedSpreadDelegate.height / 3)
4630- && mousePos.y > -units.gu(4)
4631- && mousePos.x > -units.gu(4)
4632- && mousePos.x < (clippedSpreadDelegate.width * 2 / 3)
4633- height: units.gu(1.5)
4634- width: height
4635- sourceSize.width: width
4636- sourceSize.height: height
4637-
4638- MouseArea {
4639- id: closeMouseArea
4640- objectName: "closeMouseArea"
4641- anchors.fill: closeImage
4642- anchors.margins: -units.gu(2)
4643- onClicked: {
4644- spreadRepeater.closingIndex = index;
4645- model.surface.close();
4646- }
4647- }
4648- }
4649- }
4650- }
4651- }
4652-
4653-
4654- MouseArea {
4655- id: hoverMouseArea
4656- objectName: "hoverMouseArea"
4657- anchors.fill: spreadContainer
4658- propagateComposedEvents: true
4659- hoverEnabled: true
4660- enabled: false
4661- visible: enabled
4662-
4663- property int scrollAreaWidth: root.width / 3
4664- property bool progressiveScrollingEnabled: false
4665-
4666- onMouseXChanged: {
4667- mouse.accepted = false
4668-
4669- if (hoverMouseArea.pressed) {
4670- return;
4671- }
4672-
4673- // Find the hovered item and mark it active
4674- var mapped = mapToItem(spreadContainer, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
4675- var itemUnder = spreadContainer.childAt(mapped.x, mapped.y)
4676- if (itemUnder) {
4677- mapped = mapToItem(itemUnder, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
4678- var delegateChild = itemUnder.childAt(mapped.x, mapped.y)
4679- if (delegateChild && (delegateChild.objectName === "clippedSpreadDelegate" || delegateChild.objectName === "tileInfo")) {
4680- spreadRepeater.highlightedIndex = spreadRepeater.indexOf(itemUnder)
4681- }
4682- }
4683-
4684- if (spreadFlickable.contentWidth > spreadFlickable.minContentWidth) {
4685- var margins = spreadFlickable.width * 0.05;
4686-
4687- if (!progressiveScrollingEnabled && mouseX < spreadFlickable.width - scrollAreaWidth) {
4688- progressiveScrollingEnabled = true
4689- }
4690-
4691- // do we need to scroll?
4692- if (mouseX < scrollAreaWidth + margins) {
4693- var progress = Math.min(1, (scrollAreaWidth + margins - mouseX) / (scrollAreaWidth - margins));
4694- var contentX = (1 - progress) * (spreadFlickable.contentWidth - spreadFlickable.width)
4695- spreadFlickable.contentX = Math.max(0, Math.min(spreadFlickable.contentX, contentX))
4696- }
4697- if (mouseX > spreadFlickable.width - scrollAreaWidth && progressiveScrollingEnabled) {
4698- var progress = Math.min(1, (mouseX - (spreadFlickable.width - scrollAreaWidth)) / (scrollAreaWidth - margins))
4699- var contentX = progress * (spreadFlickable.contentWidth - spreadFlickable.width)
4700- spreadFlickable.contentX = Math.min(spreadFlickable.contentWidth - spreadFlickable.width, Math.max(spreadFlickable.contentX, contentX))
4701- }
4702- }
4703- }
4704- onPressed: mouse.accepted = false
4705- }
4706-
4707- FloatingFlickable {
4708- id: spreadFlickable
4709- objectName: "spreadFlickable"
4710- anchors.fill: parent
4711- property int minContentWidth: 6 * Math.min(height / 4, width / 5)
4712- contentWidth: Math.max(6, topLevelSurfaceList.count) * Math.min(height / 4, width / 5)
4713- enabled: false
4714-
4715- function snapTo(contentX) {
4716- snapAnimation.stop();
4717- snapAnimation.to = contentX
4718- snapAnimation.start();
4719- }
4720-
4721- UbuntuNumberAnimation {
4722- id: snapAnimation
4723- target: spreadFlickable
4724- property: "contentX"
4725- }
4726- }
4727-
4728- Item {
4729- id: workspaceSelector
4730- anchors {
4731- left: parent.left
4732- top: parent.top
4733- right: parent.right
4734- topMargin: units.gu(3.5)
4735- }
4736- height: root.height * 0.25
4737- visible: false
4738-
4739- RowLayout {
4740- anchors.fill: parent
4741- spacing: units.gu(1)
4742- Item { Layout.fillWidth: true }
4743- Repeater {
4744- model: 1 // TODO: will be a workspacemodel in the future
4745- Item {
4746- Layout.fillHeight: true
4747- Layout.preferredWidth: ((height - units.gu(6)) * root.width / root.height)
4748- Image {
4749- source: root.background
4750- anchors {
4751- left: parent.left
4752- right: parent.right
4753- verticalCenter: parent.verticalCenter
4754- }
4755- height: parent.height * 0.75
4756-
4757- ShaderEffect {
4758- anchors.fill: parent
4759-
4760- property var source: ShaderEffectSource {
4761- id: shaderEffectSource
4762- sourceItem: root.workspace
4763- }
4764-
4765- fragmentShader: "
4766- varying highp vec2 qt_TexCoord0;
4767- uniform sampler2D source;
4768- void main(void)
4769- {
4770- highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
4771- gl_FragColor = sourceColor;
4772- }"
4773- }
4774- }
4775-
4776- // TODO: This is the bar for the currently selected workspace
4777- // Enable this once the workspace stuff is implemented
4778- // Rectangle {
4779- // anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
4780- // height: units.dp(2)
4781- // color: theme.palette.normal.focus
4782- // visible: index == 0 // TODO: should be active workspace index
4783- // }
4784- }
4785-
4786- }
4787- // TODO: This is the "new workspace" button. Enable this once workspaces are implemented
4788- // Item {
4789- // Layout.fillHeight: true
4790- // Layout.preferredWidth: ((height - units.gu(6)) * root.width / root.height)
4791- // Rectangle {
4792- // anchors {
4793- // left: parent.left
4794- // right: parent.right
4795- // verticalCenter: parent.verticalCenter
4796- // }
4797- // height: parent.height * 0.75
4798- // color: "#22ffffff"
4799-
4800- // Label {
4801- // anchors.centerIn: parent
4802- // font.pixelSize: parent.height / 2
4803- // text: "+"
4804- // }
4805- // }
4806- // }
4807- Item { Layout.fillWidth: true }
4808- }
4809- }
4810-
4811- Label {
4812- id: currentSelectedLabel
4813- anchors { bottom: parent.bottom; bottomMargin: root.height * 0.625; horizontalCenter: parent.horizontalCenter }
4814- text: spreadRepeater.highlightedIndex >= 0 ? spreadRepeater.itemAt(spreadRepeater.highlightedIndex).windowTitle: ""
4815- visible: false
4816- fontSize: "large"
4817- }
4818-
4819- states: [
4820- State {
4821- name: "altTab"; when: root.altTabPressed
4822- PropertyChanges { target: blurLayer; saturation: 0.8; blurRadius: 60; visible: true }
4823- PropertyChanges { target: workspaceSelector; visible: true }
4824- PropertyChanges { target: spreadContainer; visible: true }
4825- PropertyChanges { target: spreadFlickable; enabled: spreadFlickable.contentWidth > spreadFlickable.minContentWidth }
4826- PropertyChanges { target: currentSelectedLabel; visible: true }
4827- PropertyChanges { target: spreadBackground; visible: true }
4828- PropertyChanges { target: hoverMouseArea; enabled: true }
4829- }
4830- ]
4831- transitions: [
4832- Transition {
4833- from: "*"
4834- to: "altTab"
4835- SequentialAnimation {
4836- PropertyAction { target: spreadRepeater; property: "highlightedIndex"; value: Math.min(topLevelSurfaceList.count - 1, 1) }
4837- PauseAnimation { duration: spreadContainer.animateIn ? 0 : 140 }
4838- PropertyAction { target: workspaceSelector; property: "visible" }
4839- PropertyAction { target: spreadContainer; property: "visible" }
4840- ParallelAnimation {
4841- UbuntuNumberAnimation { target: blurLayer; properties: "saturation,blurRadius"; duration: UbuntuAnimation.SnapDuration }
4842- PropertyAction { target: spreadFlickable; property: "visible" }
4843- PropertyAction { targets: [currentSelectedLabel,spreadBackground]; property: "visible" }
4844- PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
4845- }
4846- PropertyAction { target: hoverMouseArea; properties: "enabled,progressiveScrollingEnabled"; value: false }
4847- }
4848- },
4849- Transition {
4850- from: "*"
4851- to: "*"
4852- PropertyAnimation { property: "opacity" }
4853- ScriptAction { script: { root.focusSelected() } }
4854- PropertyAction { target: spreadRepeater; property: "highlightedIndex"; value: -1 }
4855- PropertyAction { target: spreadContainer; property: "animateIn"; value: false }
4856- }
4857- ]
4858-}
4859
4860=== removed file 'qml/Stages/DesktopSpreadDelegate.qml'
4861--- qml/Stages/DesktopSpreadDelegate.qml 2016-05-17 20:46:51 +0000
4862+++ qml/Stages/DesktopSpreadDelegate.qml 1970-01-01 00:00:00 +0000
4863@@ -1,126 +0,0 @@
4864-/*
4865- * Copyright (C) 2014-2016 Canonical, Ltd.
4866- *
4867- * This program is free software; you can redistribute it and/or modify
4868- * it under the terms of the GNU General Public License as published by
4869- * the Free Software Foundation; version 3.
4870- *
4871- * This program is distributed in the hope that it will be useful,
4872- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4873- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4874- * GNU General Public License for more details.
4875- *
4876- * You should have received a copy of the GNU General Public License
4877- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4878- *
4879- * Authors: Michael Zanetti <michael.zanetti@canonical.com>
4880- */
4881-
4882-import QtQuick 2.4
4883-import Ubuntu.Components 1.3
4884-import Unity.Application 0.1
4885-
4886-Item {
4887- id: root
4888-
4889- property alias window: applicationWindow
4890- property alias application: applicationWindow.application
4891- property alias surface: applicationWindow.surface
4892-
4893- property bool highlightShown: false
4894- property real shadowOpacity: 1
4895-
4896- property int windowWidth: surface ? surface.size.width : 0
4897- property int windowHeight: surface ? surface.size.height : 0
4898-
4899- state: "normal"
4900- states: [
4901- State {
4902- name: "normal"
4903- PropertyChanges {
4904- target: root
4905- width: windowWidth
4906- height: windowHeight
4907- }
4908- },
4909- State {
4910- name: "transformed"
4911- PropertyChanges {
4912- target: applicationWindow
4913- itemScale: Math.max(root.width / root.windowWidth, root.height / root.windowHeight)
4914- interactive: false
4915- }
4916- PropertyChanges {
4917- target: clipper
4918- clip: true
4919- }
4920- }
4921- ]
4922-
4923- scale: highlightShown ? 1.025 : 1
4924- Behavior on scale {
4925- UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
4926- }
4927-
4928- BorderImage {
4929- anchors {
4930- fill: root
4931- margins: -units.gu(2)
4932- }
4933- source: "graphics/dropshadow2gu.sci"
4934- opacity: root.shadowOpacity * .3
4935- }
4936-
4937- Rectangle {
4938- id: selectionHighlight
4939- anchors.fill: parent
4940- anchors.margins: -units.gu(1)
4941- color: "white"
4942- opacity: highlightShown ? 0.55 : 0
4943- antialiasing: true
4944- }
4945-
4946- Rectangle {
4947- anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
4948- height: units.dp(2)
4949- color: theme.palette.normal.focus
4950- visible: root.highlightShown
4951- antialiasing: true
4952- }
4953-
4954- Item {
4955- id: clipper
4956- anchors.fill: parent
4957-
4958- ApplicationWindow {
4959- id: applicationWindow
4960- objectName: application ? "appWindow_" + application.appId : "appWindow_null"
4961- anchors.top: parent.top
4962- anchors.topMargin: 0
4963- anchors.left: parent.left
4964- width: root.windowWidth
4965- height: root.windowHeight
4966- interactive: false
4967- resizeSurface: false
4968- focus: false
4969-
4970- property real itemScale: 1
4971- transform: [
4972- Scale {
4973- origin.x: 0; origin.y: 0
4974- xScale: applicationWindow.itemScale
4975- yScale: applicationWindow.itemScale
4976- }
4977- ]
4978- }
4979- }
4980-
4981- Rectangle {
4982- anchors.fill: parent
4983- color: "black"
4984- opacity: root.highlightShown ? 0 : .1
4985- Behavior on opacity {
4986- UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
4987- }
4988- }
4989-}
4990
4991=== removed file 'qml/Stages/PhoneStage.qml'
4992--- qml/Stages/PhoneStage.qml 2016-08-08 11:18:19 +0000
4993+++ qml/Stages/PhoneStage.qml 1970-01-01 00:00:00 +0000
4994@@ -1,806 +0,0 @@
4995-/*
4996- * Copyright (C) 2014-2016 Canonical, Ltd.
4997- *
4998- * This program is free software; you can redistribute it and/or modify
4999- * it under the terms of the GNU General Public License as published by
5000- * the Free Software Foundation; version 3.
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches