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

Proposed by Michael Zanetti
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2603
Merged at revision: 2662
Proposed branch: lp:~mzanetti/unity8/unified-stages
Merge into: lp:unity8
Diff against target: 12285 lines (+3477/-6154)
62 files modified
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/Components/InputMethod.qml (+1/-1)
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 (+1241/-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 (+157/-219)
tests/qmltests/Stage/tst_Splash.qml (+1/-1)
tests/qmltests/Stage/tst_SurfaceContainer.qml (+2/-2)
tests/qmltests/Stage/tst_TabletStage.qml (+109/-243)
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
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Daniel d'Andrada (community) Needs Information
Review via email: mp+307720@code.launchpad.net

This proposal supersedes a proposal from 2016-09-13.

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 : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

Likewise in qml/Notifications/NotificationMenuItemFactory.qml

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

"""
// 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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

qml/Stage/Stage.qml

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

Typo in comment.

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

"""
                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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

> 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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

> """
> 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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

> 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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> 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 : Posted in a previous version of this proposal

> 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 : Posted in a previous version of this proposal

> 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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

> 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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

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)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Good, focus and camera issues fixed

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

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)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

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

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

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

Found a loose end when dragging a corner-maximized window. :(

https://youtu.be/LaoNkYjPlUk

review: Needs Fixing
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

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

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

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

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

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

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

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

> Found a loose end when dragging a corner-maximized window. :(
>
> https://youtu.be/LaoNkYjPlUk

That's fixed now, thanks.

Are those failures caused by this branch?

"""
qmltestrunner.PhoneStage::test_focusedAppIsTheOnlyRunningApp
qmltestrunner.PhoneStage::test_dashRemainsRunningIfStageIsToldSo
qmltestrunner.TabletStage::test_unloadSideStageByDraggingFromSideStage
"""

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

>
> Are those failures caused by this branch?
>
> """
> qmltestrunner.PhoneStage::test_focusedAppIsTheOnlyRunningApp
> qmltestrunner.PhoneStage::test_dashRemainsRunningIfStageIsToldSo
> qmltestrunner.TabletStage::test_unloadSideStageByDraggingFromSideStage
> """

I can't reproduce them locally but have some changes running now which hopefully get away with them...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fix test flakiness

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:2603
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2352/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3095
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1741
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1741
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1741
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3123
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2979/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2979
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2979/artifact/output/*zip*/output.zip

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

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

CI green now (modulo an unrelated test failure on yaketty)

review: Approve
lp:~mzanetti/unity8/unified-stages updated
2604. By Michael Zanetti

fix spread close input area

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

Verified and re-tested, still good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/unity8.install'
--- debian/unity8.install 2016-06-20 22:42:46 +0000
+++ debian/unity8.install 2016-10-11 21:49:13 +0000
@@ -16,7 +16,7 @@
16usr/share/unity8/OrientedShell.qml16usr/share/unity8/OrientedShell.qml
17usr/share/unity8/DisabledScreenNotice.qml17usr/share/unity8/DisabledScreenNotice.qml
18usr/share/unity8/Shell.qml18usr/share/unity8/Shell.qml
19usr/share/unity8/Stages19usr/share/unity8/Stage
20usr/share/unity8/Tutorial20usr/share/unity8/Tutorial
21usr/share/unity8/Wizard21usr/share/unity8/Wizard
22usr/share/url-dispatcher/urls/unity8-dash.url-dispatcher22usr/share/url-dispatcher/urls/unity8-dash.url-dispatcher
2323
=== modified file 'plugins/Ubuntu/Gestures/TouchGate.cpp'
--- plugins/Ubuntu/Gestures/TouchGate.cpp 2016-07-13 07:29:00 +0000
+++ plugins/Ubuntu/Gestures/TouchGate.cpp 2016-10-11 21:49:13 +0000
@@ -61,7 +61,10 @@
61 const QTouchEvent::TouchPoint &touchPoint = touchPoints[i];61 const QTouchEvent::TouchPoint &touchPoint = touchPoints[i];
6262
63 if (touchPoint.state() == Qt::TouchPointPressed) {63 if (touchPoint.state() == Qt::TouchPointPressed) {
64 Q_ASSERT(!m_touchInfoMap.contains(touchPoint.id()));64// FIXME: This assert triggers frequently in make trySomething. We have verified
65// that it's a bug in the mouse to touch conversion of the test environment
66// and not in the actual product. Still, it probably should be cleaned up eventually.
67// Q_ASSERT(!m_touchInfoMap.contains(touchPoint.id()));
65 m_touchInfoMap[touchPoint.id()].ownership = OwnershipRequested;68 m_touchInfoMap[touchPoint.id()].ownership = OwnershipRequested;
66 m_touchInfoMap[touchPoint.id()].ended = false;69 m_touchInfoMap[touchPoint.id()].ended = false;
67 TouchRegistry::instance()->requestTouchOwnership(touchPoint.id(), this);70 TouchRegistry::instance()->requestTouchOwnership(touchPoint.id(), this);
6871
=== modified file 'plugins/WindowManager/TopLevelSurfaceList.cpp'
--- plugins/WindowManager/TopLevelSurfaceList.cpp 2016-04-04 13:43:41 +0000
+++ plugins/WindowManager/TopLevelSurfaceList.cpp 2016-10-11 21:49:13 +0000
@@ -133,11 +133,6 @@
133133
134void TopLevelSurfaceList::connectSurface(MirSurfaceInterface *surface)134void TopLevelSurfaceList::connectSurface(MirSurfaceInterface *surface)
135{135{
136 connect(surface, &MirSurfaceInterface::focusedChanged, this, [this, surface](bool focused){
137 if (focused) {
138 this->raise(surface);
139 }
140 });
141 connect(surface, &MirSurfaceInterface::liveChanged, this, [this, surface](bool live){136 connect(surface, &MirSurfaceInterface::liveChanged, this, [this, surface](bool live){
142 if (!live) {137 if (!live) {
143 onSurfaceDied(surface);138 onSurfaceDied(surface);
144139
=== modified file 'qml/CMakeLists.txt'
--- qml/CMakeLists.txt 2015-03-06 04:44:11 +0000
+++ qml/CMakeLists.txt 2016-10-11 21:49:13 +0000
@@ -12,7 +12,7 @@
12 Launcher12 Launcher
13 Notifications13 Notifications
14 Panel14 Panel
15 Stages15 Stage
16 Rotation16 Rotation
17 Tutorial17 Tutorial
18 Wizard18 Wizard
1919
=== modified file 'qml/Components/EdgeBarrier.qml'
--- qml/Components/EdgeBarrier.qml 2016-02-15 16:43:56 +0000
+++ qml/Components/EdgeBarrier.qml 2016-10-11 21:49:13 +0000
@@ -29,6 +29,8 @@
29 // Supported values are: Qt.LeftEdge, Qt.RightEdge29 // Supported values are: Qt.LeftEdge, Qt.RightEdge
30 property int edge: Qt.LeftEdge30 property int edge: Qt.LeftEdge
3131
32 readonly property alias progress: controller.progress
33
32 property Item target: parent34 property Item target: parent
33 function push(amount) { controller.push(amount); }35 function push(amount) { controller.push(amount); }
34 signal passed()36 signal passed()
3537
=== modified file 'qml/Components/FloatingFlickable.qml'
--- qml/Components/FloatingFlickable.qml 2016-08-08 10:41:38 +0000
+++ qml/Components/FloatingFlickable.qml 2016-10-11 21:49:13 +0000
@@ -35,6 +35,9 @@
35 property alias contentX: flickable.contentX35 property alias contentX: flickable.contentX
36 property alias contentY: flickable.contentY36 property alias contentY: flickable.contentY
37 property alias direction: swipeArea.direction37 property alias direction: swipeArea.direction
38 property alias leftMargin: flickable.leftMargin
39 property alias rightMargin: flickable.rightMargin
40 property alias dragging: flickable.dragging
3841
39 MouseEventGenerator {42 MouseEventGenerator {
40 id: mouseEventGenerator43 id: mouseEventGenerator
4144
=== modified file 'qml/Components/InputMethod.qml'
--- qml/Components/InputMethod.qml 2016-06-30 13:51:32 +0000
+++ qml/Components/InputMethod.qml 2016-10-11 21:49:13 +0000
@@ -21,7 +21,7 @@
21Item {21Item {
22 id: root22 id: root
2323
24 readonly property rect visibleRect: surfaceItem.surface ? surfaceItem.surface.inputBounds : Qt.rect(0, 0, 0, 0)24 readonly property rect visibleRect: surfaceItem.surface && visible ? surfaceItem.surface.inputBounds : Qt.rect(0, 0, 0, 0)
2525
26 MirSurfaceItem {26 MirSurfaceItem {
27 id: surfaceItem27 id: surfaceItem
2828
=== modified file 'qml/Greeter/LoginAreaContainer.qml'
--- qml/Greeter/LoginAreaContainer.qml 2016-06-14 17:34:35 +0000
+++ qml/Greeter/LoginAreaContainer.qml 2016-10-11 21:49:13 +0000
@@ -26,7 +26,7 @@
26 rightMargin: -units.gu(1.5)26 rightMargin: -units.gu(1.5)
27 bottomMargin: -units.gu(1.5)27 bottomMargin: -units.gu(1.5)
28 }28 }
29 source: "../Stages/graphics/dropshadow2gu.sci"29 source: "../graphics/dropshadow2gu.sci"
30 opacity: 0.3530 opacity: 0.35
31 }31 }
3232
3333
=== modified file 'qml/Notifications/Notification.qml'
--- qml/Notifications/Notification.qml 2016-08-19 13:27:05 +0000
+++ qml/Notifications/Notification.qml 2016-10-11 21:49:13 +0000
@@ -143,7 +143,7 @@
143 fill: contents143 fill: contents
144 margins: shapedBack.visible ? -units.gu(1) : -units.gu(1.5)144 margins: shapedBack.visible ? -units.gu(1) : -units.gu(1.5)
145 }145 }
146 source: "../Stages/graphics/dropshadow2gu.sci"146 source: "../graphics/dropshadow2gu.sci"
147 opacity: notification.opacity * 0.5147 opacity: notification.opacity * 0.5
148 enabled: !fullscreen148 enabled: !fullscreen
149 }149 }
150150
=== modified file 'qml/Rotation/RotationStates.qml'
--- qml/Rotation/RotationStates.qml 2016-04-29 12:52:53 +0000
+++ qml/Rotation/RotationStates.qml 2016-10-11 21:49:13 +0000
@@ -121,12 +121,6 @@
121 }121 }
122 }122 }
123123
124 property var shellBeingResized: Binding {
125 target: root.shell
126 property: "beingResized"
127 value: d.transitioning
128 }
129
130 readonly property int fullAnimation: 0124 readonly property int fullAnimation: 0
131 readonly property int indicatorsBarAnimation: 1125 readonly property int indicatorsBarAnimation: 1
132 readonly property int noAnimation: 2126 readonly property int noAnimation: 2
133127
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2016-09-22 07:42:01 +0000
+++ qml/Shell.qml 2016-10-11 21:49:13 +0000
@@ -35,7 +35,7 @@
35import "Panel"35import "Panel"
36import "Components"36import "Components"
37import "Notifications"37import "Notifications"
38import "Stages"38import "Stage"
39import "Tutorial"39import "Tutorial"
40import "Wizard"40import "Wizard"
41import Unity.Notifications 1.0 as NotificationBackend41import Unity.Notifications 1.0 as NotificationBackend
@@ -58,24 +58,22 @@
58 property real nativeWidth58 property real nativeWidth
59 property real nativeHeight59 property real nativeHeight
60 property alias indicatorAreaShowProgress: panel.indicatorAreaShowProgress60 property alias indicatorAreaShowProgress: panel.indicatorAreaShowProgress
61 property bool beingResized
62 property string usageScenario: "phone" // supported values: "phone", "tablet" or "desktop"61 property string usageScenario: "phone" // supported values: "phone", "tablet" or "desktop"
63 property string mode: "full-greeter"62 property string mode: "full-greeter"
64 property alias oskEnabled: inputMethod.enabled63 property alias oskEnabled: inputMethod.enabled
65 function updateFocusedAppOrientation() {64 function updateFocusedAppOrientation() {
66 applicationsDisplayLoader.item.updateFocusedAppOrientation();65 stage.updateFocusedAppOrientation();
67 }66 }
68 function updateFocusedAppOrientationAnimated() {67 function updateFocusedAppOrientationAnimated() {
69 applicationsDisplayLoader.item.updateFocusedAppOrientationAnimated();68 stage.updateFocusedAppOrientationAnimated();
70 }69 }
71 property bool hasMouse: false70 property bool hasMouse: false
7271
73 // to be read from outside72 // to be read from outside
74 readonly property int mainAppWindowOrientationAngle:73 readonly property int mainAppWindowOrientationAngle: stage.mainAppWindowOrientationAngle
75 applicationsDisplayLoader.item ? applicationsDisplayLoader.item.mainAppWindowOrientationAngle : 0
7674
77 readonly property bool orientationChangesEnabled: panel.indicators.fullyClosed75 readonly property bool orientationChangesEnabled: panel.indicators.fullyClosed
78 && (applicationsDisplayLoader.item && applicationsDisplayLoader.item.orientationChangesEnabled)76 && stage.orientationChangesEnabled
79 && (!greeter || !greeter.animating)77 && (!greeter || !greeter.animating)
8078
81 readonly property bool showingGreeter: greeter && greeter.shown79 readonly property bool showingGreeter: greeter && greeter.shown
@@ -89,19 +87,13 @@
89 return Qt.PrimaryOrientation;87 return Qt.PrimaryOrientation;
90 } else if (showingGreeter || notifications.topmostIsFullscreen) {88 } else if (showingGreeter || notifications.topmostIsFullscreen) {
91 return Qt.PrimaryOrientation;89 return Qt.PrimaryOrientation;
92 } else if (applicationsDisplayLoader.item) {
93 return shell.orientations.map(applicationsDisplayLoader.item.supportedOrientations);
94 } else {90 } else {
95 // we just don't care91 return shell.orientations.map(stage.supportedOrientations);
96 return Qt.PortraitOrientation
97 | Qt.LandscapeOrientation
98 | Qt.InvertedPortraitOrientation
99 | Qt.InvertedLandscapeOrientation;
100 }92 }
101 }93 }
10294
103 readonly property var mainApp:95 readonly property var mainApp: stage.mainApp
104 applicationsDisplayLoader.item ? applicationsDisplayLoader.item.mainApp : null96
105 onMainAppChanged: {97 onMainAppChanged: {
106 if (mainApp) {98 if (mainApp) {
107 _onMainAppChanged(mainApp.appId);99 _onMainAppChanged(mainApp.appId);
@@ -278,154 +270,50 @@
278 applicationsModel: ApplicationManager270 applicationsModel: ApplicationManager
279 }271 }
280272
281 Loader {273 Stage {
282 id: applicationsDisplayLoader274 id: stage
283 objectName: "applicationsDisplayLoader"275 objectName: "stage"
284 anchors.fill: parent276 anchors.fill: parent
285277 focus: true
286 // When we have a locked app, we only want to show that one app.278
287 // FIXME: do this in a less traumatic way. We currently only allow279 dragAreaWidth: shell.edgeSize
288 // locked apps in phone mode (see FIXME in Lockscreen component in280 background: wallpaperResolver.background
289 // this same file). When that changes, we need to do something281 leftEdgeDragProgress: !greeter || greeter.locked || !tutorial.launcherLongSwipeEnabled ? 0 :
290 // nicer here. But this code is currently just to prevent a282 Math.max(0, (launcher.dragDistance * (stage.width - launcher.panelWidth) / stage.width) - launcher.panelWidth)
291 // theoretical attack where user enters lockedApp mode, then makes283
292 // the screen larger (maybe connects to monitor) and tries to enter284 applicationManager: ApplicationManager
293 // tablet mode.285 topLevelSurfaceList: topLevelSurfaceList
286 inputMethodRect: inputMethod.visibleRect
294287
295 property string usageScenario: shell.usageScenario === "phone" || greeter.hasLockedApp288 property string usageScenario: shell.usageScenario === "phone" || greeter.hasLockedApp
296 ? "phone"289 ? "phone"
297 : shell.usageScenario290 : shell.usageScenario
298 readonly property string qmlComponent: {291
299 if (applicationsDisplayLoader.usageScenario === "phone") {292 mode: usageScenario == "phone" ? "staged"
300 return "Stages/PhoneStage.qml";293 : usageScenario == "tablet" ? "stagedWithSideStage"
301 } else if (applicationsDisplayLoader.usageScenario === "tablet") {294 : "windowed"
302 return "Stages/TabletStage.qml";295
303 } else {296 shellOrientation: shell.orientation
304 return "Stages/DesktopStage.qml";297 shellOrientationAngle: shell.orientationAngle
305 }298 orientations: shell.orientations
306 }299 nativeWidth: shell.nativeWidth
307 // TODO: Ensure the current stage is destroyed before the new one gets loaded.300 nativeHeight: shell.nativeHeight
308 // Currently the new one will get loaded while the old is still hanging301
309 // around for a bit, which might lead to conflicts where both stages302 interactive: (!greeter || !greeter.shown)
310 // change the model simultaneously.
311 onQmlComponentChanged: {
312 if (item) item.stageAboutToBeUnloaded();
313 source = qmlComponent;
314 }
315
316 property bool interactive: (!greeter || !greeter.shown)
317 && panel.indicators.fullyClosed303 && panel.indicators.fullyClosed
318 && launcher.progress == 0304 && launcher.progress == 0
319 && !notifications.useModal305 && !notifications.useModal
320306
321 onInteractiveChanged: { if (interactive) { focus = true; } }307 onInteractiveChanged: { if (interactive) { focus = true; } }
322308
323 Binding {309 leftMargin: shell.usageScenario == "desktop" && !settings.autohideLauncher ? launcher.panelWidth: 0
324 target: applicationsDisplayLoader.item310 suspended: greeter.shown
325 property: "focus"311 keepDashRunning: launcher.shown || launcher.dashSwipe
326 value: true312 altTabPressed: physicalKeysMapper.altTabPressed
327 }313 oskEnabled: shell.oskEnabled
328 Binding {314
329 target: applicationsDisplayLoader.item315 // TODO: This is not implemented yet in the new stage...
330 property: "objectName"316 spreadEnabled: tutorial.spreadEnabled && (!greeter || (!greeter.hasLockedApp && !greeter.shown))
331 value: "stage"
332 }
333 Binding {
334 target: applicationsDisplayLoader.item
335 property: "dragAreaWidth"
336 value: shell.edgeSize
337 }
338 Binding {
339 target: applicationsDisplayLoader.item
340 property: "maximizedAppTopMargin"
341 // Not just using panel.panelHeight as that changes depending on the focused app.
342 value: panel.indicators.minimizedPanelHeight
343 }
344 Binding {
345 target: applicationsDisplayLoader.item
346 property: "interactive"
347 value: applicationsDisplayLoader.interactive
348 }
349 Binding {
350 target: applicationsDisplayLoader.item
351 property: "spreadEnabled"
352 value: tutorial.spreadEnabled && (!greeter || (!greeter.hasLockedApp && !greeter.shown))
353 }
354 Binding {
355 target: applicationsDisplayLoader.item
356 property: "inverseProgress"
357 value: !greeter || greeter.locked || !tutorial.launcherLongSwipeEnabled ? 0 : launcher.progress
358 }
359 Binding {
360 target: applicationsDisplayLoader.item
361 property: "shellOrientationAngle"
362 value: shell.orientationAngle
363 }
364 Binding {
365 target: applicationsDisplayLoader.item
366 property: "shellOrientation"
367 value: shell.orientation
368 }
369 Binding {
370 target: applicationsDisplayLoader.item
371 property: "orientations"
372 value: shell.orientations
373 }
374 Binding {
375 target: applicationsDisplayLoader.item
376 property: "background"
377 value: wallpaperResolver.cachedBackground
378 }
379 Binding {
380 target: applicationsDisplayLoader.item
381 property: "nativeWidth"
382 value: shell.nativeWidth
383 }
384 Binding {
385 target: applicationsDisplayLoader.item
386 property: "nativeHeight"
387 value: shell.nativeHeight
388 }
389 Binding {
390 target: applicationsDisplayLoader.item
391 property: "beingResized"
392 value: shell.beingResized
393 }
394 Binding {
395 target: applicationsDisplayLoader.item
396 property: "keepDashRunning"
397 value: launcher.shown || launcher.dashSwipe
398 }
399 Binding {
400 target: applicationsDisplayLoader.item
401 property: "suspended"
402 value: greeter.shown
403 }
404 Binding {
405 target: applicationsDisplayLoader.item
406 property: "altTabPressed"
407 value: physicalKeysMapper.altTabPressed
408 }
409 Binding {
410 target: applicationsDisplayLoader.item
411 property: "leftMargin"
412 value: shell.usageScenario == "desktop" && !settings.autohideLauncher ? launcher.panelWidth: 0
413 }
414 Binding {
415 target: applicationsDisplayLoader.item
416 property: "applicationManager"
417 value: ApplicationManager
418 }
419 Binding {
420 target: applicationsDisplayLoader.item
421 property: "topLevelSurfaceList"
422 value: topLevelSurfaceList
423 }
424 Binding {
425 target: applicationsDisplayLoader.item
426 property: "oskEnabled"
427 value: shell.oskEnabled
428 }
429 }317 }
430 }318 }
431319
@@ -442,6 +330,7 @@
442330
443 Loader {331 Loader {
444 id: greeterLoader332 id: greeterLoader
333 objectName: "greeterLoader"
445 anchors.fill: parent334 anchors.fill: parent
446 anchors.topMargin: panel.panelHeight335 anchors.topMargin: panel.panelHeight
447 sourceComponent: shell.mode != "shell" ? integratedGreeter :336 sourceComponent: shell.mode != "shell" ? integratedGreeter :
@@ -650,7 +539,7 @@
650 }539 }
651 onFocusChanged: {540 onFocusChanged: {
652 if (!focus) {541 if (!focus) {
653 applicationsDisplayLoader.focus = true;542 stage.focus = true;
654 }543 }
655 }544 }
656545
@@ -706,12 +595,12 @@
706 delayed: dialogs.hasActiveDialog || notifications.hasNotification ||595 delayed: dialogs.hasActiveDialog || notifications.hasNotification ||
707 inputMethod.visible ||596 inputMethod.visible ||
708 (launcher.shown && !launcher.lockedVisible) ||597 (launcher.shown && !launcher.lockedVisible) ||
709 panel.indicators.shown || stage.dragProgress > 0598 panel.indicators.shown || stage.rightEdgeDragProgress > 0
710 usageScenario: shell.usageScenario599 usageScenario: shell.usageScenario
711 lastInputTimestamp: inputFilter.lastInputTimestamp600 lastInputTimestamp: inputFilter.lastInputTimestamp
712 launcher: launcher601 launcher: launcher
713 panel: panel602 panel: panel
714 stage: applicationsDisplayLoader.item603 stage: stage
715 }604 }
716605
717 Wizard {606 Wizard {
@@ -802,7 +691,7 @@
802 z: dialogs.z + 10691 z: dialogs.z + 10
803 GlobalShortcut { shortcut: Qt.Key_Print; onTriggered: itemGrabber.capture(shell) }692 GlobalShortcut { shortcut: Qt.Key_Print; onTriggered: itemGrabber.capture(shell) }
804 Connections {693 Connections {
805 target: applicationsDisplayLoader.item694 target: stage
806 ignoreUnknownSignals: true695 ignoreUnknownSignals: true
807 onItemSnapshotRequested: itemGrabber.capture(item)696 onItemSnapshotRequested: itemGrabber.capture(item)
808 }697 }
@@ -814,7 +703,7 @@
814 z: itemGrabber.z + 1703 z: itemGrabber.z + 1
815 topBoundaryOffset: panel.panelHeight704 topBoundaryOffset: panel.panelHeight
816705
817 confiningItem: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.itemConfiningMouseCursor : null706 confiningItem: stage.itemConfiningMouseCursor
818707
819 property bool mouseNeverMoved: true708 property bool mouseNeverMoved: true
820 Binding {709 Binding {
@@ -828,10 +717,9 @@
828717
829 height: units.gu(3)718 height: units.gu(3)
830719
831 readonly property var previewRectangle: applicationsDisplayLoader.item && applicationsDisplayLoader.item.previewRectangle &&720 readonly property var previewRectangle: stage.previewRectangle.target &&
832 applicationsDisplayLoader.item.previewRectangle.target &&721 stage.previewRectangle.target.dragging ?
833 applicationsDisplayLoader.item.previewRectangle.target.dragging ?722 stage.previewRectangle : null
834 applicationsDisplayLoader.item.previewRectangle : null
835723
836 onPushedLeftBoundary: {724 onPushedLeftBoundary: {
837 if (buttons === Qt.NoButton) {725 if (buttons === Qt.NoButton) {
@@ -842,9 +730,8 @@
842 }730 }
843731
844 onPushedRightBoundary: {732 onPushedRightBoundary: {
845 if (buttons === Qt.NoButton && applicationsDisplayLoader.item733 if (buttons === Qt.NoButton) {
846 && applicationsDisplayLoader.item.pushRightEdge) {734 stage.pushRightEdge(amount);
847 applicationsDisplayLoader.item.pushRightEdge(amount);
848 } else if (buttons === Qt.LeftButton && previewRectangle && previewRectangle.target.canBeMaximizedLeftRight) {735 } else if (buttons === Qt.LeftButton && previewRectangle && previewRectangle.target.canBeMaximizedLeftRight) {
849 previewRectangle.maximizeRight(amount);736 previewRectangle.maximizeRight(amount);
850 }737 }
851738
=== renamed directory 'qml/Stages' => 'qml/Stage'
=== modified file 'qml/Stage/ApplicationWindow.qml'
--- qml/Stages/ApplicationWindow.qml 2016-08-08 11:18:19 +0000
+++ qml/Stage/ApplicationWindow.qml 2016-10-11 21:49:13 +0000
@@ -20,8 +20,8 @@
2020
21FocusScope {21FocusScope {
22 id: root22 id: root
23 implicitWidth: surfaceContainer.implicitWidth23 implicitWidth: requestedWidth
24 implicitHeight: surfaceContainer.implicitHeight24 implicitHeight: requestedHeight
2525
26 // to be read from outside26 // to be read from outside
27 property alias interactive: surfaceContainer.interactive27 property alias interactive: surfaceContainer.interactive
@@ -29,22 +29,10 @@
29 readonly property string title: surface && surface.name !== "" ? surface.name : d.name29 readonly property string title: surface && surface.name !== "" ? surface.name : d.name
30 readonly property QtObject focusedSurface: d.focusedSurface.surface30 readonly property QtObject focusedSurface: d.focusedSurface.surface
3131
32 // overridable from outside
33 property bool fullscreen: {
34 if (surface) {
35 return surface.state === Mir.FullscreenState;
36 } else if (application) {
37 return application.fullscreen;
38 } else {
39 return false;
40 }
41 }
42
43 // to be set from outside32 // to be set from outside
44 property QtObject surface33 property QtObject surface
45 property QtObject application34 property QtObject application
46 property int surfaceOrientationAngle35 property int surfaceOrientationAngle
47 property alias resizeSurface: surfaceContainer.resizeSurface
48 property int requestedWidth: -136 property int requestedWidth: -1
49 property int requestedHeight: -137 property int requestedHeight: -1
50 property real splashRotation: 038 property real splashRotation: 0
@@ -156,6 +144,9 @@
156 id: screenshotImage144 id: screenshotImage
157 objectName: "screenshotImage"145 objectName: "screenshotImage"
158 anchors.fill: parent146 anchors.fill: parent
147 fillMode: Image.PreserveAspectCrop
148 horizontalAlignment: Image.AlignLeft
149 verticalAlignment: Image.AlignTop
159 antialiasing: !root.interactive150 antialiasing: !root.interactive
160 z: 1151 z: 1
161152
@@ -197,6 +188,7 @@
197188
198 SurfaceContainer {189 SurfaceContainer {
199 id: surfaceContainer190 id: surfaceContainer
191 anchors.fill: parent
200 z: splashLoader.z + 1192 z: splashLoader.z + 1
201 requestedWidth: root.requestedWidth193 requestedWidth: root.requestedWidth
202 requestedHeight: root.requestedHeight194 requestedHeight: root.requestedHeight
@@ -220,6 +212,8 @@
220 surface: model.surface212 surface: model.surface
221 width: root.width213 width: root.width
222 height: root.height214 height: root.height
215 requestedWidth: root.requestedWidth
216 requestedHeight: root.requestedHeight
223 isPromptSurface: true217 isPromptSurface: true
224 z: surfaceContainer.z + (promptSurfacesRepeater.count - index)218 z: surfaceContainer.z + (promptSurfacesRepeater.count - index)
225 property int index: model.index219 property int index: model.index
@@ -239,28 +233,6 @@
239 property Item first: null233 property Item first: null
240 }234 }
241235
242 // SurfaceContainer size drives ApplicationWindow size
243 Binding {
244 target: root; property: "width"
245 value: stateGroup.state === "surface" ? surfaceContainer.width : root.requestedWidth
246 when: root.requestedWidth >= 0
247 }
248 Binding {
249 target: root; property: "height"
250 value: stateGroup.state === "surface" ? surfaceContainer.height : root.requestedHeight
251 when: root.requestedHeight >= 0
252 }
253
254 // ApplicationWindow size drives SurfaceContainer size
255 Binding {
256 target: surfaceContainer; property: "width"; value: root.width
257 when: root.requestedWidth < 0
258 }
259 Binding {
260 target: surfaceContainer; property: "height"; value: root.height
261 when: root.requestedHeight < 0
262 }
263
264 StateGroup {236 StateGroup {
265 id: stateGroup237 id: stateGroup
266 objectName: "applicationWindowStateGroup"238 objectName: "applicationWindowStateGroup"
@@ -287,6 +259,11 @@
287 (d.liveSurface ||259 (d.liveSurface ||
288 (d.applicationState !== ApplicationInfoInterface.Running260 (d.applicationState !== ApplicationInfoInterface.Running
289 && screenshotImage.status !== Image.Ready))261 && screenshotImage.status !== Image.Ready))
262 PropertyChanges {
263 target: root
264 implicitWidth: surfaceContainer.implicitWidth
265 implicitHeight: surfaceContainer.implicitHeight
266 }
290 },267 },
291 State {268 State {
292 name: "screenshot"269 name: "screenshot"
@@ -424,5 +401,4 @@
424 }401 }
425 ]402 ]
426 }403 }
427
428}404}
429405
=== modified file 'qml/Stage/DecoratedWindow.qml'
--- qml/Stages/DecoratedWindow.qml 2016-09-08 14:13:27 +0000
+++ qml/Stage/DecoratedWindow.qml 2016-10-11 21:49:13 +0000
@@ -17,34 +17,46 @@
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.318import Ubuntu.Components 1.3
19import Unity.Application 0.119import Unity.Application 0.1
20import "Spread/MathUtils.js" as MathUtils
2021
21FocusScope {22FocusScope {
22 id: root23 id: root
2324
24 width: !counterRotate ? applicationWindow.width : applicationWindow.height25 // The DecoratedWindow takes requestedWidth/requestedHeight and asks its surface to be resized to that
25 height: visibleDecorationHeight + (!counterRotate ? applicationWindow.height : applicationWindow.width)26 // (minus the window decoration size in case hasDecoration and showDecoration are true)
27 // The surface might not be able to resize to the requested values. It will return its actual size
28 // in implicitWidth/implicitHeight.
2629
27 property alias application: applicationWindow.application30 property alias application: applicationWindow.application
28 property alias surface: applicationWindow.surface31 property alias surface: applicationWindow.surface
29 readonly property alias focusedSurface: applicationWindow.focusedSurface32 readonly property alias focusedSurface: applicationWindow.focusedSurface
30 property alias active: decoration.active33 property alias active: decoration.active
31 readonly property alias title: applicationWindow.title34 readonly property alias title: applicationWindow.title
32 property alias fullscreen: applicationWindow.fullscreen
33 property alias maximizeButtonShown: decoration.maximizeButtonShown35 property alias maximizeButtonShown: decoration.maximizeButtonShown
36 property alias interactive: applicationWindow.interactive
37 readonly property alias orientationChangesEnabled: applicationWindow.orientationChangesEnabled
3438
35 readonly property bool decorationShown: !fullscreen39 // Changing this will actually add/remove a decoration, meaning, requestedHeight will take the decoration into account.
36 property bool highlightShown: false40 property bool hasDecoration: true
37 property real shadowOpacity: 141 // This will temporarily show/hide the decoration without actually changing the surface's dimensions
42 property real showDecoration: 1
43 property bool animateDecoration: false
44 property bool showHighlight: false
45 property int highlightSize: units.gu(1)
46 property real shadowOpacity: 0
47 property bool darkening: false
3848
39 property real requestedWidth49 property real requestedWidth
40 property real requestedHeight50 property real requestedHeight
51 property real scaleToPreviewProgress: 0
52 property int scaleToPreviewSize: units.gu(30)
4153
42 property alias surfaceOrientationAngle: applicationWindow.surfaceOrientationAngle54 property alias surfaceOrientationAngle: applicationWindow.surfaceOrientationAngle
43 readonly property real visibleDecorationHeight: root.decorationShown ? decoration.height : 055 readonly property real decorationHeight: Math.min(d.visibleDecorationHeight, d.requestedDecorationHeight)
44 readonly property bool counterRotate: surfaceOrientationAngle != 0 && surfaceOrientationAngle != 18056 readonly property bool counterRotate: surfaceOrientationAngle != 0 && surfaceOrientationAngle != 180
4557
46 readonly property int minimumWidth: !counterRotate ? applicationWindow.minimumWidth : applicationWindow.minimumHeight58 readonly property int minimumWidth: !counterRotate ? applicationWindow.minimumWidth : applicationWindow.minimumHeight
47 readonly property int minimumHeight: visibleDecorationHeight + (!counterRotate ? applicationWindow.minimumHeight : applicationWindow.minimumWidth)59 readonly property int minimumHeight: decorationHeight + (!counterRotate ? applicationWindow.minimumHeight : applicationWindow.minimumWidth)
48 readonly property int maximumWidth: !counterRotate ? applicationWindow.maximumWidth : applicationWindow.maximumHeight60 readonly property int maximumWidth: !counterRotate ? applicationWindow.maximumWidth : applicationWindow.maximumHeight
49 readonly property int maximumHeight: (root.decorationShown && applicationWindow.maximumHeight > 0 ? decoration.height : 0)61 readonly property int maximumHeight: (root.decorationShown && applicationWindow.maximumHeight > 0 ? decoration.height : 0)
50 + (!counterRotate ? applicationWindow.maximumHeight : applicationWindow.maximumWidth)62 + (!counterRotate ? applicationWindow.maximumHeight : applicationWindow.maximumWidth)
@@ -66,40 +78,86 @@
66 signal decorationPressed()78 signal decorationPressed()
67 signal decorationReleased()79 signal decorationReleased()
6880
81 QtObject {
82 id: d
83 property int requestedDecorationHeight: root.hasDecoration ? decoration.height : 0
84 Behavior on requestedDecorationHeight { enabled: root.animateDecoration; UbuntuNumberAnimation { } }
85
86 property int visibleDecorationHeight: root.hasDecoration ? root.showDecoration * decoration.height : 0
87 Behavior on visibleDecorationHeight { enabled: root.animateDecoration; UbuntuNumberAnimation { } }
88 }
89
90 StateGroup {
91 states: [
92 State {
93 name: "normal"; when: root.scaleToPreviewProgress <= 0 && root.application.state === ApplicationInfoInterface.Running
94 PropertyChanges {
95 target: root
96 implicitWidth: counterRotate ? applicationWindow.implicitHeight : applicationWindow.implicitWidth
97 implicitHeight: root.decorationHeight + (counterRotate ? applicationWindow.implicitWidth: applicationWindow.implicitHeight)
98 }
99 },
100 State {
101 name: "normalSuspended"; when: root.scaleToPreviewProgress <= 0 && root.application.state !== ApplicationInfoInterface.Running
102 extend: "normal"
103 PropertyChanges {
104 target: root
105 implicitWidth: counterRotate ? applicationWindow.requestedHeight : applicationWindow.requestedWidth
106 implicitHeight: root.decorationHeight + (counterRotate ? applicationWindow.requestedWidth: applicationWindow.requestedHeight)
107 }
108 },
109 State {
110 name: "preview"; when: root.scaleToPreviewProgress > 0
111 PropertyChanges {
112 target: root
113 implicitWidth: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, root.scaleToPreviewSize, root.scaleToPreviewProgress)
114 implicitHeight: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, root.scaleToPreviewSize, root.scaleToPreviewProgress)
115 }
116 PropertyChanges {
117 target: applicationWindow;
118 requestedWidth: applicationWindow.oldRequestedWidth
119 requestedHeight: applicationWindow.oldRequestedHeight
120 width: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, applicationWindow.minSize, root.scaleToPreviewProgress)
121 height: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, applicationWindow.minSize, root.scaleToPreviewProgress)
122 itemScale: root.implicitWidth / width
123 }
124 }
125 ]
126 }
127
69 Rectangle {128 Rectangle {
70 id: selectionHighlight129 id: selectionHighlight
130 objectName: "selectionHighlight"
71 anchors.fill: parent131 anchors.fill: parent
72 anchors.margins: -units.gu(1)132 anchors.margins: -root.highlightSize
73 color: "white"133 color: "white"
74 opacity: highlightShown ? 0.15 : 0134 opacity: showHighlight ? 0.55 : 0
75 }135 visible: opacity > 0
76
77 Rectangle {
78 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
79 height: units.dp(2)
80 color: theme.palette.normal.focus
81 visible: highlightShown
82 }136 }
83137
84 BorderImage {138 BorderImage {
139 id: dropShadow
85 anchors {140 anchors {
86 fill: root141 left: parent.left; top: parent.top; right: parent.right
87 margins: active ? -units.gu(2) : -units.gu(1.5)142 margins: active ? -units.gu(2) : -units.gu(1.5)
88 }143 }
89 source: "graphics/dropshadow2gu.sci"144 height: Math.min(applicationWindow.implicitHeight, applicationWindow.height) * applicationWindow.itemScale
90 opacity: root.shadowOpacity * .3145 + root.decorationHeight * Math.min(1, root.showDecoration) + (active ? units.gu(4) : units.gu(3))
91 visible: !fullscreen146 source: "../graphics/dropshadow2gu.sci"
147 opacity: root.shadowOpacity
92 }148 }
93149
94 WindowDecoration {150 WindowDecoration {
95 id: decoration151 id: decoration
96 target: root.parent152 target: root.parent || null
97 objectName: "appWindowDecoration"153 objectName: "appWindowDecoration"
98 anchors { left: parent.left; top: parent.top; right: parent.right }154 anchors { left: parent.left; top: parent.top; right: parent.right }
99 height: units.gu(3)155 height: units.gu(3)
100 width: root.width156 width: root.width
101 title: applicationWindow.title157 title: applicationWindow.title
102 visible: root.decorationShown158 opacity: root.hasDecoration ? Math.min(1, root.showDecoration) : 0
159
160 Behavior on opacity { UbuntuNumberAnimation { } }
103161
104 onCloseClicked: root.closeClicked();162 onCloseClicked: root.closeClicked();
105 onMaximizeClicked: { root.decorationPressed(); root.maximizeClicked(); }163 onMaximizeClicked: { root.decorationPressed(); root.maximizeClicked(); }
@@ -126,16 +184,25 @@
126 ApplicationWindow {184 ApplicationWindow {
127 id: applicationWindow185 id: applicationWindow
128 objectName: "appWindow"186 objectName: "appWindow"
187 anchors.left: parent.left
129 anchors.top: parent.top188 anchors.top: parent.top
130 anchors.topMargin: decoration.height189 anchors.topMargin: root.decorationHeight * Math.min(1, root.showDecoration)
131 anchors.left: parent.left190 width: implicitWidth
132 readonly property real requestedHeightMinusDecoration: root.requestedHeight - root.visibleDecorationHeight191 height: implicitHeight
133 requestedHeight: !counterRotate ? requestedHeightMinusDecoration : root.requestedWidth192 requestedHeight: !counterRotate ? root.requestedHeight - d.requestedDecorationHeight : root.requestedWidth
134 requestedWidth: !counterRotate ? root.requestedWidth : requestedHeightMinusDecoration193 requestedWidth: !counterRotate ? root.requestedWidth : root.requestedHeight - d.requestedDecorationHeight
135 interactive: true194 property int oldRequestedWidth: requestedWidth
195 property int oldRequestedHeight: requestedHeight
196 onRequestedWidthChanged: oldRequestedWidth = requestedWidth
197 onRequestedHeightChanged: oldRequestedHeight = requestedHeight
136 focus: true198 focus: true
137199
138 transform: Rotation {200 property real itemScale: 1
201 property real minSize: Math.min(root.scaleToPreviewSize, Math.min(requestedHeight, Math.min(requestedWidth, Math.min(implicitHeight, implicitWidth))))
202
203 transform: [
204 Rotation {
205 id: rotationTransform
139 readonly property int rotationAngle: applicationWindow.application &&206 readonly property int rotationAngle: applicationWindow.application &&
140 applicationWindow.application.rotatesWindowContents207 applicationWindow.application.rotatesWindowContents
141 ? ((360 - applicationWindow.surfaceOrientationAngle) % 360) : 0208 ? ((360 - applicationWindow.surfaceOrientationAngle) % 360) : 0
@@ -152,6 +219,19 @@
152 else return 0;219 else return 0;
153 }220 }
154 angle: rotationAngle221 angle: rotationAngle
155 }222 },
223 Scale {
224 xScale: applicationWindow.itemScale
225 yScale: applicationWindow.itemScale
226 }
227 ]
228
229 }
230
231 Rectangle {
232 anchors.fill: parent
233 color: "black"
234 opacity: root.darkening && !root.showHighlight ? 0.05 : 0
235 Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
156 }236 }
157}237}
158238
=== modified file 'qml/Stage/MoveHandler.qml'
--- qml/Stages/MoveHandler.qml 2016-09-08 14:13:27 +0000
+++ qml/Stage/MoveHandler.qml 2016-10-11 21:49:13 +0000
@@ -112,8 +112,8 @@
112 // Use integer coordinate values to ensure that target is left in a pixel-aligned112 // Use integer coordinate values to ensure that target is left in a pixel-aligned
113 // position. Mouse movement could have subpixel precision, yielding a fractional113 // position. Mouse movement could have subpixel precision, yielding a fractional
114 // mouse position.114 // mouse position.
115 target.requestedX = Math.round(pos.x - priv.distanceX);115 target.windowedX = Math.round(pos.x - priv.distanceX);
116 target.requestedY = Math.round(Math.max(pos.y - priv.distanceY, PanelState.panelHeight));116 target.windowedY = Math.round(Math.max(pos.y - priv.distanceY, PanelState.panelHeight));
117117
118 if (sensingPoints) { // edge/corner detection when dragging via the touch overlay118 if (sensingPoints) { // edge/corner detection when dragging via the touch overlay
119 if (sensingPoints.topLeft.x < priv.triggerArea && sensingPoints.topLeft.y < PanelState.panelHeight + priv.triggerArea119 if (sensingPoints.topLeft.x < priv.triggerArea && sensingPoints.topLeft.y < PanelState.panelHeight + priv.triggerArea
120120
=== modified file 'qml/Stage/PromptSurfaceAnimations.qml'
--- qml/Stages/PromptSurfaceAnimations.qml 2016-04-04 13:38:56 +0000
+++ qml/Stage/PromptSurfaceAnimations.qml 2016-10-11 21:49:13 +0000
@@ -43,7 +43,7 @@
43 SequentialAnimation {43 SequentialAnimation {
44 // clip so we don't go out of parent's bounds during spread44 // clip so we don't go out of parent's bounds during spread
45 PropertyAction { target: root.container.parent; property: "clip"; value: true }45 PropertyAction { target: root.container.parent; property: "clip"; value: true }
46 UbuntuNumberAnimation { target: root.surfaceItem; property: "y"; to: root.container.height46 UbuntuNumberAnimation { target: root.surfaceItem; property: "anchors.topMargin"; to: root.container.height
47 duration: UbuntuAnimation.BriskDuration }47 duration: UbuntuAnimation.BriskDuration }
48 PropertyAction { target: root.surfaceItem; property: "visible"; value: false }48 PropertyAction { target: root.surfaceItem; property: "visible"; value: false }
49 PropertyAction { target: container.parent; property: "clip"; value: false }49 PropertyAction { target: container.parent; property: "clip"; value: false }
@@ -61,11 +61,10 @@
61 // clip so we don't go out of parent's bounds during spread61 // clip so we don't go out of parent's bounds during spread
62 PropertyAction { target: root.container.parent; property: "clip"; value: true }62 PropertyAction { target: root.container.parent; property: "clip"; value: true }
63 ScriptAction { script: {63 ScriptAction { script: {
64 root.surfaceItem.y = root.container.height;
65 root.surfaceItem.visible = true;64 root.surfaceItem.visible = true;
66 } }65 } }
67 UbuntuNumberAnimation {66 UbuntuNumberAnimation {
68 target: root.surfaceItem; property: "y"; to: 067 target: root.surfaceItem; property: "anchors.topMargin"; from: root.container.height; to: 0
69 duration: UbuntuAnimation.BriskDuration68 duration: UbuntuAnimation.BriskDuration
70 }69 }
71 PropertyAction { target: container.parent; property: "clip"; value: false }70 PropertyAction { target: container.parent; property: "clip"; value: false }
7271
=== added directory 'qml/Stage/Spread'
=== added file 'qml/Stage/Spread/BezierCurve.qml'
--- qml/Stage/Spread/BezierCurve.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/BezierCurve.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,45 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import QtQuick.Window 2.2
20import 'cubic-bezier.js' as Bezier
21import 'KeySpline.js' as KeySpline
22
23Item {
24 id: root
25
26 property var controlPoint1: {'x':0, 'y':0}
27 property var controlPoint2: {'x':0, 'y':0}
28 property var controlPoint3: {'x':0.58, 'y':1}
29 property var controlPoint4: {'x':1, 'y':1}
30
31 function getValues(t) {
32 if (t<0) t=0
33 else if (t>1)t=1
34
35 return Bezier.getBezier(t, controlPoint1, controlPoint2, controlPoint3, controlPoint4)
36 }
37
38 function getYFromX(x) {
39 var spline = new KeySpline.keySpline(controlPoint2.x, controlPoint2.y, controlPoint3.x, controlPoint3.y)
40 if (x<0) x=0
41 else if (x>1)x=1
42
43 return spline.get(x)
44 }
45}
046
=== added file 'qml/Stage/Spread/KeySpline.js'
--- qml/Stage/Spread/KeySpline.js 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/KeySpline.js 2016-10-11 21:49:13 +0000
@@ -0,0 +1,66 @@
1/** MIT License
2 *
3 * KeySpline - use bezier curve for transition easing function
4 * Copyright (c) 2012 Gaetan Renaudeau <renaudeau.gaetan@gmail.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24/**
25* KeySpline - use bezier curve for transition easing function
26* is inspired from Firefox's nsSMILKeySpline.cpp
27* Usage:
28* var spline = new KeySpline(0.25, 0.1, 0.25, 1.0)
29* spline.get(x) => returns the easing value | x must be in [0, 1] range
30*/
31
32.pragma library
33
34function keySpline (mX1, mY1, mX2, mY2) {
35
36 this.get = function(aX) {
37 if (mX1 == mY1 && mX2 == mY2) return aX; // linear
38 return CalcBezier(GetTForX(aX), mY1, mY2);
39 }
40
41 function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
42 function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
43 function C(aA1) { return 3.0 * aA1; }
44
45 // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
46 function CalcBezier(aT, aA1, aA2) {
47 return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT;
48 }
49
50 // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
51 function GetSlope(aT, aA1, aA2) {
52 return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
53 }
54
55 function GetTForX(aX) {
56 // Newton raphson iteration
57 var aGuessT = aX;
58 for (var i = 0; i < 4; ++i) {
59 var currentSlope = GetSlope(aGuessT, mX1, mX2);
60 if (currentSlope == 0.0) return aGuessT;
61 var currentX = CalcBezier(aGuessT, mX1, mX2) - aX;
62 aGuessT -= currentX / currentSlope;
63 }
64 return aGuessT;
65 }
66}
067
=== added file 'qml/Stage/Spread/MathUtils.js'
--- qml/Stage/Spread/MathUtils.js 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/MathUtils.js 2016-10-11 21:49:13 +0000
@@ -0,0 +1,95 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17.pragma library
18
19/**
20 * From processing.js: https://raw.githubusercontent.com/processing-js/processing-js/v1.4.8/processing.js
21 *
22 * Re-map a number from one range to another. In the example above, the number
23 * '25' is converted from a value in the range 0..100 into a value that
24 * ranges from the left edge (0) to the right edge (width) of the screen.
25 * Numbers outside the range are not clamped to 0 and 1, because out-of-range
26 * values are often intentional and useful.
27 *
28 * @param {Number} value The incoming value to be converted
29 * @param {Number} istart Lower bound of the value's current range
30 * @param {Number} istop Upper bound of the value's current range
31 * @param {Number} ostart Lower bound of the value's target range
32 * @param {Number} ostop Upper bound of the value's target range
33 *
34 * @returns {Number}
35 */
36function map(value, istart, istop, ostart, ostop) {
37 return ostart + (ostop - ostart) * ((value - istart) / (istop - istart))
38}
39
40/**
41 * Return a value which is always between `min` and `max`
42 *
43 * @param {Number} value The current value
44 * @param {Number} min The minimum value
45 * @param {Number} max The maximum value
46 *
47 * @returns {Number}
48 */
49function clamp(value, min, max) {
50 if (value < min) return min
51 if (value > max) return max
52 return value
53}
54
55// calculates the distance from the middle of one rect to middle of other rect
56function rectDistance(rect1, rect2) {
57 return pointDistance(Qt.point(rect1.x + rect1.width / 2, rect1.y + rect1.height / 2),
58 Qt.point(rect2.x + rect2.width / 2, rect2.y + rect2.height / 2))
59}
60
61// calculates the distance between two points
62function pointDistance(point1, point2) {
63 return Math.sqrt(Math.pow(point1.x - point2.x, 2) +
64 Math.pow(point1.y - point2.y, 2)
65 )
66}
67
68// from http://stackoverflow.com/questions/14616829/java-method-to-find-the-rectangle-that-is-the-intersection-of-two-rectangles-usi
69function intersectionRect(r1, r2) {
70 var xmin = Math.max(r1.x, r2.x);
71 var xmax1 = r1.x + r1.width;
72 var xmax2 = r2.x + r2.width;
73 var xmax = Math.min(xmax1, xmax2);
74 var out = {x:0, y:0, width:0, height:0}
75 if (xmax > xmin) {
76 var ymin = Math.max(r1.y, r2.y);
77 var ymax1 = r1.y + r1.height;
78 var ymax2 = r2.y + r2.height;
79 var ymax = Math.min(ymax1, ymax2);
80 if (ymax > ymin) {
81 out.x = xmin;
82 out.y = ymin;
83 out.width = xmax - xmin;
84 out.height = ymax - ymin;
85 }
86 }
87 return out;
88}
89
90function easeOutCubic(t) { return (--t)*t*t+1 }
91
92function linearAnimation(startProgress, endProgress, startValue, endValue, progress) {
93 // progress : progressDiff = value : valueDiff => value = progress * valueDiff / progressDiff
94 return (progress - startProgress) * (endValue - startValue) / (endProgress - startProgress) + startValue;
95}
096
=== added file 'qml/Stage/Spread/OpacityMask.qml'
--- qml/Stage/Spread/OpacityMask.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/OpacityMask.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,82 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18
19Item {
20 id: root
21 anchors.fill: sourceItem
22 anchors.margins: -units.gu(2)
23 visible: sourceItem !== null
24
25 property var sourceItem: null
26 property int maskX: 0
27 property int maskY: 0
28 property int maskWidth: 0
29 property int maskHeight: 0
30
31 property real opacityValue: 1
32
33 Item {
34 id: opacityMask
35 anchors.fill: parent
36
37 Rectangle {
38 id: clipRect
39 color: "black"
40 x: root.maskX - root.anchors.margins
41 y: root.maskY - root.anchors.margins
42 width: root.maskWidth
43 height: root.maskHeight
44 opacity: 1 - root.opacityValue
45 }
46 }
47
48 ShaderEffect {
49 id: opacityEffect
50 anchors.fill: parent
51
52 property variant source: ShaderEffectSource {
53 id: shaderEffectSource
54 sourceItem: root.sourceItem
55 sourceRect: root.sourceItem ? Qt.rect(sourceItem.x + root.anchors.margins,
56 sourceItem.y + root.anchors.margins,
57 sourceItem.width - root.anchors.margins * 2,
58 sourceItem.height - root.anchors.margins * 2)
59 : Qt.rect(0,0,0,0)
60 hideSource: true
61 }
62
63 property var mask: ShaderEffectSource {
64 sourceItem: opacityMask
65 hideSource: true
66 }
67
68 fragmentShader: "
69 varying highp vec2 qt_TexCoord0;
70 uniform sampler2D source;
71 uniform sampler2D mask;
72 void main(void)
73 {
74 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
75 highp vec4 maskColor = texture2D(mask, qt_TexCoord0);
76
77 sourceColor *= 1.0 - maskColor.a;
78
79 gl_FragColor = sourceColor;
80 }"
81 }
82}
083
=== added file 'qml/Stage/Spread/Spread.qml'
--- qml/Stage/Spread/Spread.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/Spread.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,162 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import "MathUtils.js" as MathUtils
20
21Item {
22 id: root
23
24 // Information about the environment
25 property int highlightedIndex: -1
26 property var model: null
27 property int leftMargin: 0
28 property var spreadFlickable
29
30 // some config options
31 property real contentMargin: 0.16 * root.height
32 property real contentTopMargin: contentMargin
33 property real contentBottomMargin: 0.35 * contentMargin
34 property real windowTitleTopMargin: 3/4 * (contentTopMargin - windowTitle.height)
35 property int stackItemCount: 3
36 property real leftRotationAngle: 22
37 property real rightRotationAngle: 32
38 property real leftStackScale: .82
39 property real rightStackScale: 1
40 property real rightEdgeBreakPoint: Math.min(units.gu(40) / root.width, .35)
41
42 signal leaveSpread()
43
44 // Calculated stuff
45 readonly property int totalItemCount: model.count
46 readonly property real leftStackXPos: 0.03 * root.width + leftMargin
47 readonly property real rightStackXPos: root.width - 1.5 * leftStackXPos + leftMargin
48
49 readonly property real stackHeight: spreadItemHeight - appInfoHeight
50 readonly property real stackWidth: Math.min(leftStackXPos/3, units.gu(1.5))
51
52 readonly property real spreadWidth: rightStackXPos - leftStackXPos
53 readonly property real spreadHeight: root.height
54 readonly property real spreadItemHeight: spreadHeight - contentTopMargin - contentBottomMargin
55 readonly property real spreadItemWidth: stackHeight
56
57 readonly property real dynamicLeftRotationAngle: leftRotationAngle * rotationAngleFactor
58 readonly property real dynamicRightRotationAngle: rightRotationAngle * rotationAngleFactor
59
60 readonly property real appInfoHeight: {
61 var screenHeightReferencePoint = 40 // ref screen height in gu
62 var valueAtReferencePoint = 0.17 // of screen height at the reference point
63 var appInfoHeightValueChange = -0.0014 // units / gu
64 var minAppInfoHeight = 0.08
65 var maxAppInfoHeight = 0.2
66 var screenHeightInGU = root.height / units.gu(1) // screenHeight in gu
67
68 return MathUtils.clamp(valueAtReferencePoint + appInfoHeightValueChange * (screenHeightInGU - screenHeightReferencePoint), minAppInfoHeight, maxAppInfoHeight) * root.height
69 }
70
71 property real rotationAngleFactor: {
72 var spreadHeightReferencePoint = 28 // reference spread height in gu
73 var valueAtReferencePoint = 1.3
74 var rotationAngleValueChange = -0.008 // units / gu
75 var minRotationAngleFactor = 0.6
76 var maxRotationAngleFactor = 1.5
77 var spreadHeightInGU = spreadHeight / units.gu(1)
78
79 return MathUtils.clamp(valueAtReferencePoint + rotationAngleValueChange * (spreadHeightInGU - spreadHeightReferencePoint), minRotationAngleFactor, maxRotationAngleFactor)
80 }
81 readonly property real itemOverlap: {
82 var spreadAspectRatioReferencePoint = 1.0 // ref screen height in gu
83 var valueAtReferencePoint = 0.74 // of screen height at the reference point
84 var itemOverlapValueChange = -0.068
85 var minOverlap = 0.55
86 var maxOverlap = 0.82
87 var spreadAspectRatio = spreadWidth / stackHeight // spread stack aspect ratio (app info not included)
88
89 return MathUtils.clamp(valueAtReferencePoint + itemOverlapValueChange * (spreadAspectRatio - spreadAspectRatioReferencePoint), minOverlap, maxOverlap)
90 }
91
92 readonly property real visibleItemCount: (spreadWidth / spreadItemWidth) / (1 - itemOverlap)
93
94 readonly property real spreadTotalWidth: totalItemCount * spreadWidth / visibleItemCount
95
96 readonly property real centeringOffset: Math.max(spreadWidth - spreadTotalWidth ,0) / (2 * spreadWidth)
97
98
99 readonly property var curve: BezierCurve {
100 controlPoint2: {'x': 0.19, 'y': 0.00}
101 controlPoint3: {'x': 0.91, 'y': 1.00}
102 }
103
104 Label {
105 id: windowTitle
106
107 width: Math.min(implicitWidth, 0.5*root.width)
108 elide: Qt.ElideMiddle
109 anchors.horizontalCenter: parent.horizontalCenter
110 y: windowTitleTopMargin
111 readonly property var highlightedSurface: root.model ? root.model.surfaceAt(root.highlightedIndex) : null
112 readonly property var highlightedApp: root.model ? root.model.applicationAt(root.highlightedIndex) : null
113 text: root.highlightedIndex >= 0 && highlightedSurface && highlightedSurface.name != "" ? highlightedSurface.name :
114 highlightedApp ? highlightedApp.name : ""
115 fontSize: root.height < units.gu(85) ? 'medium' : 'large'
116 color: "white"
117 opacity: root.highlightedIndex >= 0 ? 1 : 0
118 Behavior on opacity { UbuntuNumberAnimation { } }
119 }
120
121 Keys.onPressed: {
122 switch (event.key) {
123 case Qt.Key_Left:
124 case Qt.Key_Backtab:
125 selectPrevious(event.isAutoRepeat)
126 event.accepted = true;
127 break;
128 case Qt.Key_Right:
129 case Qt.Key_Tab:
130 selectNext(event.isAutoRepeat)
131 event.accepted = true;
132 break;
133 case Qt.Key_Escape:
134 highlightedIndex = -1
135 // Falling through intentionally
136 case Qt.Key_Enter:
137 case Qt.Key_Return:
138 case Qt.Key_Space:
139 root.leaveSpread();
140 event.accepted = true;
141 }
142 }
143
144
145 function selectNext(isAutoRepeat) {
146 if (isAutoRepeat && highlightedIndex >= totalItemCount -1) {
147 return; // AutoRepeat is not allowed to wrap around
148 }
149
150 highlightedIndex = (highlightedIndex + 1) % totalItemCount;
151 spreadFlickable.snap(highlightedIndex)
152 }
153
154 function selectPrevious(isAutoRepeat) {
155 if (isAutoRepeat && highlightedIndex == 0) {
156 return; // AutoRepeat is not allowed to wrap around
157 }
158
159 highlightedIndex = highlightedIndex - 1 >= 0 ? highlightedIndex - 1 : totalItemCount - 1;
160 spreadFlickable.snap(highlightedIndex)
161 }
162}
0163
=== added file 'qml/Stage/Spread/SpreadDelegateInputArea.qml'
--- qml/Stage/Spread/SpreadDelegateInputArea.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/SpreadDelegateInputArea.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,183 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
20import "../../Components"
21
22Item {
23 id: root
24
25 property bool closeable: true
26 readonly property real minSpeedToClose: units.gu(40)
27 property bool zeroVelocityCounts: false
28
29 readonly property alias distance: d.distance
30
31 signal clicked()
32 signal close()
33
34 QtObject {
35 id: d
36 property real distance: 0
37 property bool moving: false
38 property var dragEvents: []
39 property real dragVelocity: 0
40 property int threshold: units.gu(2)
41
42 // Can be replaced with a fake implementation during tests
43 // property var __getCurrentTimeMs: function () { return new Date().getTime() }
44 property var __dateTime: new function() {
45 this.getCurrentTimeMs = function() {return new Date().getTime()}
46 }
47
48 function pushDragEvent(event) {
49 var currentTime = __dateTime.getCurrentTimeMs()
50 dragEvents.push([currentTime, event.x - event.startX, event.y - event.startY, getEventSpeed(currentTime, event)])
51 cullOldDragEvents(currentTime)
52 updateSpeed()
53 }
54
55 function cullOldDragEvents(currentTime) {
56 // cull events older than 50 ms but always keep the latest 2 events
57 for (var numberOfCulledEvents = 0; numberOfCulledEvents < dragEvents.length-2; numberOfCulledEvents++) {
58 // dragEvents[numberOfCulledEvents][0] is the dragTime
59 if (currentTime - dragEvents[numberOfCulledEvents][0] <= 50) break
60 }
61
62 dragEvents.splice(0, numberOfCulledEvents)
63 }
64
65 function updateSpeed() {
66 var totalSpeed = 0
67 for (var i = 0; i < dragEvents.length; i++) {
68 totalSpeed += dragEvents[i][3]
69 }
70
71 if (zeroVelocityCounts || Math.abs(totalSpeed) > 0.001) {
72 dragVelocity = totalSpeed / dragEvents.length * 1000
73 }
74 }
75
76 function getEventSpeed(currentTime, event) {
77 if (dragEvents.length != 0) {
78 var lastDrag = dragEvents[dragEvents.length-1]
79 var duration = Math.max(1, currentTime - lastDrag[0])
80 return (event.y - event.startY - lastDrag[2]) / duration
81 } else {
82 return 0
83 }
84 }
85 }
86
87 // Event eater
88 MouseArea {
89 anchors.fill: parent
90 onClicked: root.clicked()
91 onWheel: wheel.accepted = true
92 }
93
94 MultiPointTouchArea {
95 anchors.fill: parent
96 mouseEnabled: false
97 maximumTouchPoints: 1
98 property int offset: 0
99
100 touchPoints: [
101 TouchPoint {
102 id: tp
103 }
104 ]
105
106 onCanceled: {
107 d.moving = false
108 animation.animate("center");
109 }
110
111 onTouchUpdated: {
112 if (!d.moving) {
113 if (Math.abs(tp.startY - tp.y) > d.threshold) {
114 d.moving = true;
115 d.dragEvents = []
116 offset = tp.y - tp.startY;
117 } else {
118 return;
119 }
120 }
121
122 d.distance = tp.y - tp.startY - offset
123 d.pushDragEvent(tp);
124 }
125
126 onReleased: {
127 if (!d.moving) {
128 root.clicked()
129 }
130
131 if (!root.closeable) {
132 animation.animate("center")
133 return;
134 }
135
136 var touchPoint = touchPoints[0];
137
138 if ((d.dragVelocity < -root.minSpeedToClose && d.distance < -units.gu(8)) || d.distance < -root.height / 2) {
139 animation.animate("up")
140 } else if ((d.dragVelocity > root.minSpeedToClose && d.distance > units.gu(8)) || d.distance > root.height / 2) {
141 animation.animate("down")
142 } else {
143 animation.animate("center")
144 }
145 }
146 }
147
148 UbuntuNumberAnimation {
149 id: animation
150 objectName: "closeAnimation"
151 target: d
152 property: "distance"
153 property bool requestClose: false
154
155 function animate(direction) {
156 animation.from = dragArea.distance;
157 switch (direction) {
158 case "up":
159 animation.to = -root.height * 1.5;
160 requestClose = true;
161 break;
162 case "down":
163 animation.to = root.height * 1.5;
164 requestClose = true;
165 break;
166 default:
167 animation.to = 0
168 }
169 animation.start();
170 }
171
172 onRunningChanged: {
173 if (!running) {
174 d.moving = false;
175 if (requestClose) {
176 root.close();
177 } else {
178 d.distance = 0;
179 }
180 }
181 }
182 }
183}
0184
=== added file 'qml/Stage/Spread/SpreadMaths.qml'
--- qml/Stage/Spread/SpreadMaths.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/SpreadMaths.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,78 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Utils 0.1
20import "MathUtils.js" as MathUtils
21
22Item {
23 id: root
24 anchors { left: parent.left; top: parent.top; margins: units.gu(1) }
25
26 // Information about the environment
27 property Item flickable: null
28 property Spread spread: null
29 property int itemIndex: 0
30
31 // Internal
32 property real spreadPosition: itemIndex/spread.visibleItemCount - flickable.contentX/spread.spreadWidth // 0 -> left stack, 1 -> right stack
33 property real leftStackingProgress: MathUtils.clamp(MathUtils.map(spreadPosition, 0, -spread.stackItemCount/spread.visibleItemCount , 0, 1), 0, 1)
34 property real rightStackingProgress: MathUtils.clamp(MathUtils.map(spreadPosition, 1, 1 + spread.stackItemCount/spread.visibleItemCount , 0, 1), 0, 1)
35 property real stackingX: (MathUtils.easeOutCubic(rightStackingProgress) - MathUtils.easeOutCubic(leftStackingProgress)) * spread.stackWidth
36
37
38 QtObject {
39 id: d
40 property real spreadScale: MathUtils.clamp(
41 MathUtils.map(spreadPosition, 0, 1, spread.leftStackScale, spread.rightStackScale),
42 spread.leftStackScale, spread.rightStackScale)
43
44 property real selectedScale: (spread.highlightedIndex == itemIndex ? 1.01 : 1)
45 Behavior on selectedScale { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
46
47 }
48
49 // Output
50 readonly property int targetX: spread.leftStackXPos +
51 spread.spreadWidth * spread.curve.getYFromX(spreadPosition + spread.centeringOffset) +
52 stackingX
53
54 readonly property int targetY: spread.contentTopMargin
55
56 readonly property real targetAngle: MathUtils.clamp(
57 MathUtils.map(targetX, spread.leftStackXPos, spread.rightStackXPos, spread.dynamicLeftRotationAngle, spread.dynamicRightRotationAngle),
58 Math.min(spread.dynamicLeftRotationAngle, spread.dynamicRightRotationAngle), Math.max(spread.dynamicLeftRotationAngle, spread.dynamicRightRotationAngle))
59
60
61 readonly property real targetScale: d.spreadScale * d.selectedScale
62
63 readonly property real shadowOpacity: 0.2 * (1 - rightStackingProgress) * (1 - leftStackingProgress)
64
65
66 readonly property real closeIconOffset: (targetScale - 1) * (-spread.stackHeight / 2)
67
68 readonly property real tileInfoOpacity: Math.min(MathUtils.clamp(MathUtils.map(leftStackingProgress, 0 , 1/(spread.stackItemCount*3), 1, 0), 0 , 1),
69 MathUtils.clamp(MathUtils.map(spreadPosition, 0.9 , 1, 1, 0), 0 , 1)) /** MathUtils.map(curvedSwitcherProgress, 0.7, 0.9, 0, 1)*/
70
71 readonly property bool itemVisible: {
72 var leftStackHidden = spreadPosition < -(spread.stackItemCount + 1)/spread.visibleItemCount
73 // don't hide the rightmost
74 var rightStackHidden = (spreadPosition > 1 + (spread.stackItemCount)/spread.visibleItemCount) && itemIndex !== spread.totalItemCount - 1
75 return !leftStackHidden && !rightStackHidden
76 }
77
78}
079
=== added file 'qml/Stage/Spread/StagedRightEdgeMaths.qml'
--- qml/Stage/Spread/StagedRightEdgeMaths.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/StagedRightEdgeMaths.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,174 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Unity.Application 0.1
20import "MathUtils.js" as MathUtils
21
22QtObject {
23 id: root
24
25 // Input
26 property int itemIndex: 0
27 property real progress: 0
28 property int sceneWidth: 0
29 property int sideStageWidth: 0
30 property int sceneHeight: 0
31 property int targetX: 0
32 property int startY: 0
33 property int targetY: 0
34 property real startAngle: 30
35 property real targetAngle: 0
36 property int targetHeight: 0
37 property real startScale: 1.3
38 property real targetScale: 0
39 property real breakPoint: units.gu(15) / sceneWidth
40
41 property bool isMainStageApp: false
42 property bool isSideStageApp: false
43 property bool sideStageOpen: false
44 property int nextInStack: 0
45 property int shuffledZ: 0
46
47
48 // Config
49 property int tileDistance: units.gu(10)
50
51 // Output
52
53 readonly property real scaleToPreviewProgress: {
54 return progress < breakPoint ? 0 : MathUtils.clamp(MathUtils.linearAnimation(breakPoint, 1, 0, 1, progress), 0, 1)
55 }
56 readonly property int animatedWidth: {
57 return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneWidth, targetHeight, progress)
58 }
59
60 readonly property int animatedHeight: {
61 return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneHeight, targetHeight, progress)
62 }
63
64
65 readonly property int animatedX: {
66 var nextStage = appRepeater.itemAt(nextInStack) ? appRepeater.itemAt(nextInStack).stage : ApplicationInfoInterface.MainStage;
67
68 var startX = 0;
69 if (isMainStageApp) {
70 if (progress < breakPoint) {
71 if (nextStage == ApplicationInfoInterface.MainStage) {
72 return MathUtils.linearAnimation(0, breakPoint, 0, -units.gu(4), progress);
73 } else {
74 return 0;
75 }
76 } else {
77 if (nextStage == ApplicationInfoInterface.MainStage) {
78 return MathUtils.linearAnimation(breakPoint, 1, -units.gu(4), targetX, progress);
79 } else {
80 return MathUtils.linearAnimation(breakPoint, 1, 0, targetX, progress);
81 }
82 }
83 } else if (isSideStageApp) {
84 startX = sceneWidth - sideStageWidth;
85 } else if (itemIndex == nextInStack && itemIndex <= 2 && priv.sideStageDelegate && nextStage == ApplicationInfoInterface.MainStage) {
86 startX = sceneWidth - sideStageWidth;
87 } else {
88 var stageCount = (priv.mainStageDelegate ? 1 : 0) + (priv.sideStageDelegate ? 1 : 0)
89 startX = sceneWidth + Math.max(0, itemIndex - stageCount - 1) * tileDistance;
90 }
91
92 if (itemIndex == nextInStack) {
93 if (progress < breakPoint) {
94 return MathUtils.linearAnimation(0, breakPoint, startX, startX * (1 - breakPoint), progress)
95 }
96 return MathUtils.linearAnimation(breakPoint, 1, startX * (1 - breakPoint), targetX, progress)
97 }
98
99 if (progress < breakPoint) {
100 return startX;
101 }
102
103 return MathUtils.linearAnimation(breakPoint, 1, startX, targetX, progress)
104
105 }
106
107 readonly property int animatedY: progress < breakPoint ? startY : MathUtils.linearAnimation(breakPoint, 1, startY, targetY, progress)
108
109 readonly property int animatedZ: {
110 if (progress < breakPoint + (1 - breakPoint) / 2) {
111 return shuffledZ
112 }
113 return itemIndex;
114 }
115
116 readonly property real animatedAngle: {
117 var nextStage = appRepeater.itemAt(nextInStack) ? appRepeater.itemAt(nextInStack).stage : ApplicationInfoInterface.MainStage;
118
119 var startAngle = 0;
120 if (isMainStageApp) {
121 startAngle = 0;
122 } else if (isSideStageApp) {
123 startAngle = 0;
124 } else {
125 if (stage == ApplicationInfoInterface.SideStage && itemIndex == nextInStack && !sideStageOpen) {
126 startAngle = 0;
127 } else {
128 startAngle = root.startAngle;
129 }
130 }
131
132 if ((itemIndex == nextInStack)
133 || (isMainStageApp && nextStage === ApplicationInfoInterface.MainStage)
134 || (isSideStageApp && nextStage === ApplicationInfoInterface.SideStage)) {
135 return MathUtils.linearAnimation(0, 1, startAngle, targetAngle, progress);
136 }
137
138 if (progress < breakPoint) {
139 return 0;
140 }
141 return MathUtils.linearAnimation(breakPoint, 1, startAngle, targetAngle, progress);
142 }
143
144 readonly property real animatedScale: {
145 var pullingInSideStage = itemIndex == nextInStack && stage == ApplicationInfoInterface.SideStage && !sideStageOpen;
146
147 var startScale = 1;
148 if (isMainStageApp) {
149 startScale = 1;
150 } else if (isSideStageApp) {
151 startScale = 1;
152 } else {
153 if (pullingInSideStage) {
154 startScale = 1
155 } else {
156 startScale = root.startScale;
157 }
158 }
159
160 if (progress < breakPoint) {
161 if (itemIndex == nextInStack && (sideStageOpen || stage == ApplicationInfoInterface.MainStage)) {
162 return MathUtils.linearAnimation(0, 1, startScale, targetScale, progress);
163 }
164 return startScale;
165 }
166 if (itemIndex == nextInStack) {
167 return MathUtils.linearAnimation(0, 1, startScale, targetScale, progress)
168 }
169
170 return MathUtils.linearAnimation(breakPoint, 1, startScale, targetScale, progress)
171 }
172
173 readonly property bool itemVisible: true //animatedX < sceneWidth
174}
0175
=== added file 'qml/Stage/Spread/WindowedRightEdgeMaths.qml'
--- qml/Stage/Spread/WindowedRightEdgeMaths.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/WindowedRightEdgeMaths.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,81 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Unity.Application 0.1
20import "MathUtils.js" as MathUtils
21
22QtObject {
23 id: root
24
25 // Input
26 property int itemIndex: 0
27 property int normalZ: 0
28 property real progress: 0
29 property int startWidth: 0
30 property int startHeight: 0
31 property int startX: 0
32 property int targetX: 0
33 property int startY: 0
34 property int targetY: 0
35// property real startAngle: 40
36 property real targetAngle: 0
37 property int targetHeight: 0
38 property real targetScale: 0
39
40 // Config
41 property real breakPoint: 0.4
42
43 // Output
44
45 readonly property real scaleToPreviewProgress: {
46 return progress < breakPoint ? 0 : MathUtils.clamp(MathUtils.linearAnimation(breakPoint, 1, 0, 1, progress), 0, 1)
47 }
48 readonly property int animatedWidth: {
49 return progress < breakPoint ? root.startWidth : MathUtils.linearAnimation(breakPoint, 1, root.startWidth, targetHeight, progress)
50 }
51
52 readonly property int animatedHeight: {
53 return progress < breakPoint ? root.startHeight : MathUtils.linearAnimation(breakPoint, 1, root.startHeight, targetHeight, progress)
54 }
55
56 readonly property int animatedX: {
57 if (progress < breakPoint) {
58 return startX;
59 }
60 return MathUtils.linearAnimation(breakPoint, 1, startX, targetX, progress)
61 }
62
63 readonly property int animatedY: progress < breakPoint ? startY : MathUtils.linearAnimation(breakPoint, 1, startY, targetY, progress)
64
65 readonly property real animatedAngle: progress < breakPoint ? 0 : MathUtils.linearAnimation(breakPoint, 1, 0, targetAngle, progress);
66
67 readonly property real decorationHeight: progress < breakPoint ? 1 : MathUtils.linearAnimation(breakPoint, 1, 1, 0, progress);
68
69 readonly property int animatedZ: {
70 if (progress < breakPoint + (1 - breakPoint) / 2) {
71 return itemIndex == 1 ? normalZ + 2 : normalZ
72 }
73 return itemIndex
74 }
75
76 readonly property real opacityMask: itemIndex == 1 ? MathUtils.linearAnimation(0, breakPoint, 0, 1, progress) : 1
77
78 readonly property real animatedScale: progress < breakPoint ? 1 : MathUtils.linearAnimation(breakPoint, 1, 1, targetScale, progress)
79
80// readonly property bool itemVisible: true //animatedX < sceneWidth
81}
082
=== added file 'qml/Stage/Spread/cubic-bezier.js'
--- qml/Stage/Spread/cubic-bezier.js 1970-01-01 00:00:00 +0000
+++ qml/Stage/Spread/cubic-bezier.js 2016-10-11 21:49:13 +0000
@@ -0,0 +1,39 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17//====================================\\
18// 13thParallel.org Beziér Curve Code \\
19// by Dan Pupius (www.pupius.net) \\
20//====================================\\
21
22
23var coord = function (x,y) {
24 if(!x) var x=0;
25 if(!y) var y=0;
26 return {x: x, y: y};
27}
28
29function B4(t) { return t*t*t }
30function B3(t) { return 3*t*t*(1-t) }
31function B2(t) { return 3*t*(1-t)*(1-t) }
32function B1(t) { return (1-t)*(1-t)*(1-t) }
33
34var getBezier = function(percent,C1,C2,C3,C4) {
35 var pos = new coord();
36 pos.x = C1.x*B1(percent) + C2.x*B2(percent) + C3.x*B3(percent) + C4.x*B4(percent);
37 pos.y = C1.y*B1(percent) + C2.y*B2(percent) + C3.y*B3(percent) + C4.y*B4(percent);
38 return pos;
39}
040
=== renamed file 'qml/Stages/DesktopStage.qml' => 'qml/Stage/Stage.qml'
--- qml/Stages/DesktopStage.qml 2016-09-07 08:36:59 +0000
+++ qml/Stage/Stage.qml 2016-10-11 21:49:13 +0000
@@ -22,75 +22,152 @@
22import Utils 0.122import Utils 0.1
23import Ubuntu.Gestures 0.123import Ubuntu.Gestures 0.1
24import GlobalShortcut 1.024import GlobalShortcut 1.0
25import GSettings 1.0
26import "Spread"
27import "Spread/MathUtils.js" as MathUtils
2528
26AbstractStage {29FocusScope {
27 id: root30 id: root
28 anchors.fill: parent31 anchors.fill: parent
29 paintBackground: false32
3033 property QtObject applicationManager
31 // functions to be called from outside34 property QtObject topLevelSurfaceList
32 function updateFocusedAppOrientation() { /* TODO */ }35 property bool altTabPressed
33 function updateFocusedAppOrientationAnimated() { /* TODO */}36 property url background
34 function pushRightEdge(amount) {37 property int dragAreaWidth
35 if (spread.state === "") {38 property bool interactive
36 edgeBarrier.push(amount);39 property bool keepDashRunning: true
37 }40 property real nativeHeight
38 }41 property real nativeWidth
39 function closeFocusedDelegate() {42 property QtObject orientations
40 if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {43 property int shellOrientation
41 priv.focusedAppDelegate.close();44 property int shellOrientationAngle
42 }45 property bool spreadEnabled: true // If false, animations and right edge will be disabled
43 }46 property bool suspended
4447 property int leftMargin: 0
45 // Used by TutorialRight48 property bool oskEnabled: false
46 property bool spreadShown: spread.state == "altTab"49 property rect inputMethodRect
50
51 // Configuration
52 property string mode: "staged"
53 property real leftEdgeDragProgress: 0
54
55 // Used by the tutorial code
56 readonly property bool spreadShown: state == "spread"
57 readonly property real rightEdgeDragProgress: rightEdgeDragArea.progress // How far left the stage has been dragged
4758
48 // used by the snap windows (edge maximize) feature59 // used by the snap windows (edge maximize) feature
49 readonly property alias previewRectangle: fakeRectangle60 readonly property alias previewRectangle: fakeRectangle
5061
51 mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null62 readonly property var mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
5263
53 // application windows never rotate independently64 // application windows never rotate independently
54 mainAppWindowOrientationAngle: shellOrientationAngle65 property int mainAppWindowOrientationAngle: shellOrientationAngle
5566
56 orientationChangesEnabled: true67 property bool orientationChangesEnabled: priv.focusedAppDelegate && priv.focusedAppDelegate.orientationChangesEnabled
5768
5869 property int supportedOrientations: {
59 itemConfiningMouseCursor: !spreadShown && priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&70 if (mainApp) {
71 switch (mode) {
72 case "staged":
73 return mainApp.supportedOrientations;
74 case "stagedWithSideStage":
75 var orientations = mainApp.supportedOrientations;
76 orientations |= Qt.LandscapeOrientation | Qt.InvertedLandscapeOrientation;
77 if (priv.sideStageItemId) {
78 // If we have a sidestage app, support Portrait orientation
79 // so that it will switch the sidestage app to mainstage on rotate to portrait
80 orientations |= Qt.PortraitOrientation|Qt.InvertedPortraitOrientation;
81 }
82 return orientations;
83 }
84 }
85
86 return Qt.PortraitOrientation |
87 Qt.LandscapeOrientation |
88 Qt.InvertedPortraitOrientation |
89 Qt.InvertedLandscapeOrientation;
90 }
91
92
93 onAltTabPressedChanged: priv.goneToSpread = altTabPressed
94
95 property Item itemConfiningMouseCursor: !spreadShown && priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&
60 priv.focusedAppDelegate.surface.confinesMousePointer ?96 priv.focusedAppDelegate.surface.confinesMousePointer ?
61 priv.focusedAppDelegate.clientAreaItem : null;97 priv.focusedAppDelegate.clientAreaItem : null;
6298
99 signal itemSnapshotRequested(Item item)
100
101 // functions to be called from outside
102 function updateFocusedAppOrientation() { /* TODO */ }
103 function updateFocusedAppOrientationAnimated() { /* TODO */}
104 function pushRightEdge(amount) {
105 edgeBarrier.push(amount);
106 }
107
108 onSpreadEnabledChanged: {
109 if (!spreadEnabled && root.state == "spread") {
110 priv.goneToSpread = false;
111 }
112 }
113
114 GSettings {
115 id: lifecycleExceptions
116 schema.id: "com.canonical.qtmir"
117 }
118
119 function isExemptFromLifecycle(appId) {
120 var shortAppId = appId.split('_')[0];
121 for (var i = 0; i < lifecycleExceptions.lifecycleExemptAppids.length; i++) {
122 if (shortAppId === lifecycleExceptions.lifecycleExemptAppids[i]) {
123 return true;
124 }
125 }
126 return false;
127 }
128
129 GlobalShortcut {
130 id: closeFocusedShortcut
131 shortcut: Qt.AltModifier|Qt.Key_F4
132 onTriggered: {
133 if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
134 priv.focusedAppDelegate.close();
135 }
136 }
137 }
138
63 GlobalShortcut {139 GlobalShortcut {
64 id: showSpreadShortcut140 id: showSpreadShortcut
65 shortcut: Qt.MetaModifier|Qt.Key_W141 shortcut: Qt.MetaModifier|Qt.Key_W
66 onTriggered: spread.state = "altTab"142 onTriggered: priv.goneToSpread = true
67 }143 }
68144
69 GlobalShortcut {145 GlobalShortcut {
70 id: minimizeAllShortcut146 id: minimizeAllShortcut
71 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_D147 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_D
72 onTriggered: priv.minimizeAllWindows()148 onTriggered: priv.minimizeAllWindows()
149 active: root.state == "windowed"
73 }150 }
74151
75 GlobalShortcut {152 GlobalShortcut {
76 id: maximizeWindowShortcut153 id: maximizeWindowShortcut
77 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Up154 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Up
78 onTriggered: priv.focusedAppDelegate.maximize()155 onTriggered: priv.focusedAppDelegate.maximize()
79 active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximized156 active: root.state == "windowed" && priv.focusedAppDelegate && priv.focusedAppDelegate.canBeMaximized
80 }157 }
81158
82 GlobalShortcut {159 GlobalShortcut {
83 id: maximizeWindowLeftShortcut160 id: maximizeWindowLeftShortcut
84 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Left161 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Left
85 onTriggered: priv.focusedAppDelegate.maximizeLeft()162 onTriggered: priv.focusedAppDelegate.maximizeLeft()
86 active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximizedLeftRight163 active: root.state == "windowed" && priv.focusedAppDelegate && priv.focusedAppDelegate.canBeMaximizedLeftRight
87 }164 }
88165
89 GlobalShortcut {166 GlobalShortcut {
90 id: maximizeWindowRightShortcut167 id: maximizeWindowRightShortcut
91 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Right168 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Right
92 onTriggered: priv.focusedAppDelegate.maximizeRight()169 onTriggered: priv.focusedAppDelegate.maximizeRight()
93 active: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.canBeMaximizedLeftRight170 active: root.state == "windowed" && priv.focusedAppDelegate && priv.focusedAppDelegate.canBeMaximizedLeftRight
94 }171 }
95172
96 GlobalShortcut {173 GlobalShortcut {
@@ -98,7 +175,7 @@
98 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Down175 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Down
99 onTriggered: priv.focusedAppDelegate.anyMaximized176 onTriggered: priv.focusedAppDelegate.anyMaximized
100 ? priv.focusedAppDelegate.restoreFromMaximized() : priv.focusedAppDelegate.minimize()177 ? priv.focusedAppDelegate.restoreFromMaximized() : priv.focusedAppDelegate.minimize()
101 active: priv.focusedAppDelegate !== null178 active: root.state == "windowed" && priv.focusedAppDelegate
102 }179 }
103180
104 GlobalShortcut {181 GlobalShortcut {
@@ -107,28 +184,17 @@
107 active: priv.focusedAppDelegate !== null184 active: priv.focusedAppDelegate !== null
108 }185 }
109186
110 Connections {
111 target: root.topLevelSurfaceList
112 onCountChanged: {
113 if (spread.state == "altTab") {
114 spread.cancel();
115 }
116 }
117 }
118
119 QtObject {187 QtObject {
120 id: priv188 id: priv
121 objectName: "DesktopStagePrivate"189 objectName: "DesktopStagePrivate"
122190
123 property var focusedAppDelegate: null191 property var focusedAppDelegate: null
124 onFocusedAppDelegateChanged: {
125 if (spread.state == "altTab") {
126 spread.state = "";
127 }
128 }
129
130 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel192 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
131193
194 property bool goneToSpread: false
195 property int closingIndex: -1
196 property int animationDuration: UbuntuAnimation.FastDuration
197
132 function updateForegroundMaximizedApp() {198 function updateForegroundMaximizedApp() {
133 var found = false;199 var found = false;
134 for (var i = 0; i < appRepeater.count && !found; i++) {200 for (var i = 0; i < appRepeater.count && !found; i++) {
@@ -162,11 +228,93 @@
162 }228 }
163 }229 }
164230
165 readonly property real virtualKeyboardHeight: SurfaceManager.inputMethodSurface231 readonly property bool sideStageEnabled: root.mode === "stagedWithSideStage" &&
166 ? SurfaceManager.inputMethodSurface.inputBounds.height232 (root.shellOrientation == Qt.LandscapeOrientation ||
167 : 0233 root.shellOrientation == Qt.InvertedLandscapeOrientation)
234
235 property var mainStageDelegate: null
236 property var sideStageDelegate: null
237 property int mainStageItemId: 0
238 property int sideStageItemId: 0
239 property string mainStageAppId: ""
240 property string sideStageAppId: ""
241
242 onSideStageDelegateChanged: {
243 if (!sideStageDelegate) {
244 sideStage.hide();
245 }
246 }
247
248 function updateMainAndSideStageIndexes() {
249 if (root.mode != "stagedWithSideStage") {
250 priv.sideStageDelegate = null;
251 priv.sideStageItemId = 0;
252 priv.sideStageAppId = "";
253 priv.mainStageDelegate = appRepeater.itemAt(0);
254 priv.mainStageAppId = topLevelSurfaceList.idAt(0);
255 priv.mainStageAppId = topLevelSurfaceList.applicationAt(0) ? topLevelSurfaceList.applicationAt(0).appId : ""
256 return;
257 }
258
259 var choseMainStage = false;
260 var choseSideStage = false;
261
262 if (!root.topLevelSurfaceList)
263 return;
264
265 for (var i = 0; i < appRepeater.count && (!choseMainStage || !choseSideStage); ++i) {
266 var appDelegate = appRepeater.itemAt(i);
267 if (!appDelegate) {
268 // This might happen during startup phase... If the delegate appears and claims focus
269 // things are updated and appRepeater.itemAt(x) still returns null while appRepeater.count >= x
270 // Lets just skip it, on startup it will be generated at a later point too...
271 continue;
272 }
273 if (sideStage.shown && appDelegate.stage == ApplicationInfoInterface.SideStage
274 && !choseSideStage) {
275 priv.sideStageDelegate = appDelegate
276 priv.sideStageItemId = root.topLevelSurfaceList.idAt(i);
277 priv.sideStageAppId = root.topLevelSurfaceList.applicationAt(i).appId;
278 choseSideStage = true;
279 } else if (!choseMainStage && appDelegate.stage == ApplicationInfoInterface.MainStage) {
280 priv.mainStageDelegate = appDelegate;
281 priv.mainStageItemId = root.topLevelSurfaceList.idAt(i);
282 priv.mainStageAppId = root.topLevelSurfaceList.applicationAt(i).appId;
283 choseMainStage = true;
284 }
285 }
286 if (!choseMainStage && priv.mainStageDelegate) {
287 priv.mainStageDelegate = null;
288 priv.mainStageItemId = 0;
289 priv.mainStageAppId = "";
290 }
291 if (!choseSideStage && priv.sideStageDelegate) {
292 priv.sideStageDelegate = null;
293 priv.sideStageItemId = 0;
294 priv.sideStageAppId = "";
295 }
296 }
297
298 property int nextInStack: {
299 var mainStageIndex = priv.mainStageDelegate ? priv.mainStageDelegate.itemIndex : -1;
300 var sideStageIndex = priv.sideStageDelegate ? priv.sideStageDelegate.itemIndex : -1;
301 if (sideStageIndex == -1) {
302 return topLevelSurfaceList.count > 1 ? 1 : -1;
303 }
304 if (mainStageIndex == 0 || sideStageIndex == 0) {
305 if (mainStageIndex == 1 || sideStageIndex == 1) {
306 return topLevelSurfaceList.count > 2 ? 2 : -1;
307 }
308 return 1;
309 }
310 return -1;
311 }
312
313 readonly property real virtualKeyboardHeight: root.inputMethodRect.height
168 }314 }
169315
316 Component.onCompleted: priv.updateMainAndSideStageIndexes();
317
170 Connections {318 Connections {
171 target: PanelState319 target: PanelState
172 onCloseClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.close(); } }320 onCloseClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.close(); } }
@@ -178,14 +326,13 @@
178 target: PanelState326 target: PanelState
179 property: "buttonsVisible"327 property: "buttonsVisible"
180 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized // FIXME for Locally integrated menus328 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized // FIXME for Locally integrated menus
181 && spread.state == ""
182 }329 }
183330
184 Binding {331 Binding {
185 target: PanelState332 target: PanelState
186 property: "title"333 property: "title"
187 value: {334 value: {
188 if (priv.focusedAppDelegate !== null && spread.state == "") {335 if (priv.focusedAppDelegate !== null) {
189 if (priv.focusedAppDelegate.maximized)336 if (priv.focusedAppDelegate.maximized)
190 return priv.focusedAppDelegate.title337 return priv.focusedAppDelegate.title
191 else338 else
@@ -199,7 +346,7 @@
199 Binding {346 Binding {
200 target: PanelState347 target: PanelState
201 property: "dropShadow"348 property: "dropShadow"
202 value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null349 value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null && mode == "windowed"
203 }350 }
204351
205 Binding {352 Binding {
@@ -216,16 +363,34 @@
216363
217 Instantiator {364 Instantiator {
218 model: root.applicationManager365 model: root.applicationManager
219 delegate: Binding {366 delegate: QtObject {
220 target: model.application367 property var stateBinding: Binding {
221 property: "requestedState"368 readonly property bool isDash: model.application ? model.application.appId == "unity8-dash" : false
222369 target: model.application
223 // TODO: figure out some lifecycle policy, like suspending minimized apps370 property: "requestedState"
224 // if running on a tablet or something.371
225 // TODO: If the device has a dozen suspended apps because it was running372 // TODO: figure out some lifecycle policy, like suspending minimized apps
226 // in staged mode, when it switches to Windowed mode it will suddenly373 // or something if running windowed.
227 // resume all those apps at once. We might want to avoid that.374 // TODO: If the device has a dozen suspended apps because it was running
228 value: ApplicationInfoInterface.RequestedRunning // Always running for now375 // in staged mode, when it switches to Windowed mode it will suddenly
376 // resume all those apps at once. We might want to avoid that.
377 value: root.mode === "windowed"
378 || (isDash && root.keepDashRunning)
379 || (!root.suspended && model.application && priv.focusedAppDelegate &&
380 (priv.focusedAppDelegate.appId === model.application.appId ||
381 priv.mainStageAppId === model.application.appId ||
382 priv.sideStageAppId === model.application.appId))
383 ? ApplicationInfoInterface.RequestedRunning
384 : ApplicationInfoInterface.RequestedSuspended
385 }
386
387 property var lifecycleBinding: Binding {
388 target: model.application
389 property: "exemptFromLifecycle"
390 value: model.application
391 ? (!model.application.isTouchApp || isExemptFromLifecycle(model.application.appId))
392 : false
393 }
229 }394 }
230 }395 }
231396
@@ -236,16 +401,203 @@
236 when: !appRepeater.startingUp && root.parent401 when: !appRepeater.startingUp && root.parent
237 }402 }
238403
404 states: [
405 State {
406 name: "spread"; when: priv.goneToSpread
407 PropertyChanges { target: floatingFlickable; enabled: true }
408 PropertyChanges { target: spreadItem; focus: true }
409 PropertyChanges { target: hoverMouseArea; enabled: true }
410 PropertyChanges { target: rightEdgeDragArea; enabled: false }
411 PropertyChanges { target: cancelSpreadMouseArea; enabled: true }
412 },
413 State {
414 name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
415 },
416 State {
417 name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
418 PropertyChanges {
419 target: sideStage
420 opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0
421 visible: true
422 }
423 },
424 State {
425 name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
426 },
427 State {
428 name: "staged"; when: root.mode === "staged"
429 },
430 State {
431 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
432 PropertyChanges { target: triGestureArea; enabled: true }
433 PropertyChanges { target: sideStage; visible: true }
434 },
435 State {
436 name: "windowed"; when: root.mode === "windowed"
437 }
438 ]
439 transitions: [
440 Transition {
441 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
442 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
443 },
444 Transition {
445 to: "spread"
446 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: appRepeater.count > 1 ? 1 : 0 }
447 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
448 },
449 Transition {
450 from: "spread"
451 SequentialAnimation {
452 ScriptAction {
453 script: {
454 var item = appRepeater.itemAt(Math.max(0, spreadItem.highlightedIndex));
455 if (item.stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
456 sideStage.show();
457 }
458 item.playFocusAnimation();
459 }
460 }
461 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
462 }
463 },
464 Transition {
465 to: "stagedRightEdge"
466 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
467 },
468 Transition {
469 to: "stagedWithSideStage"
470 ScriptAction { script: priv.updateMainAndSideStageIndexes(); }
471 }
472
473 ]
474
475 MouseArea {
476 id: cancelSpreadMouseArea
477 anchors.fill: parent
478 enabled: false
479 onClicked: priv.goneToSpread = false
480 }
481
239 FocusScope {482 FocusScope {
240 id: appContainer483 id: appContainer
241 objectName: "appContainer"484 objectName: "appContainer"
242 anchors.fill: parent485 anchors.fill: parent
243 focus: spread.state !== "altTab"486 focus: true
244487
245 Wallpaper {488 Wallpaper {
246 id: wallpaper489 id: wallpaper
247 anchors.fill: parent490 anchors.fill: parent
248 source: root.background491 source: root.background
492 // Make sure it's the lowest item. Due to the left edge drag we sometimes need
493 // to put the dash at -1 and we don't want it behind the Wallpaper
494 z: -2
495 }
496
497 Spread {
498 id: spreadItem
499 objectName: "spreadItem"
500 anchors.fill: appContainer
501 leftMargin: root.leftMargin
502 model: root.topLevelSurfaceList
503 spreadFlickable: floatingFlickable
504 z: 10
505
506 onLeaveSpread: {
507 priv.goneToSpread = false;
508 }
509 }
510
511 Connections {
512 target: root.topLevelSurfaceList
513 onListChanged: priv.updateMainAndSideStageIndexes()
514 }
515
516
517 DropArea {
518 objectName: "MainStageDropArea"
519 anchors {
520 left: parent.left
521 top: parent.top
522 bottom: parent.bottom
523 }
524 width: appContainer.width - sideStage.width
525 enabled: sideStage.enabled
526
527 onDropped: {
528 drop.source.appDelegate.saveStage(ApplicationInfoInterface.MainStage);
529 drop.source.appDelegate.focus = true;
530 }
531 keys: "SideStage"
532 }
533
534 SideStage {
535 id: sideStage
536 objectName: "sideStage"
537 shown: false
538 height: appContainer.height
539 x: appContainer.width - width
540 visible: false
541 Behavior on opacity { UbuntuNumberAnimation {} }
542 z: {
543 if (!priv.mainStageItemId) return 0;
544
545 if (priv.sideStageItemId && priv.nextInStack > 0) {
546
547 // Due the order in which bindings are evaluated, this might be triggered while shuffling
548 // the list and index doesn't yet match with itemIndex (even though itemIndex: index)
549 // Let's walk the list and compare itemIndex to make sure we have the correct one.
550 var nextDelegateInStack = -1;
551 for (var i = 0; i < appRepeater.count; i++) {
552 if (appRepeater.itemAt(i).itemIndex == priv.nextInStack) {
553 nextDelegateInStack = appRepeater.itemAt(i);
554 break;
555 }
556 }
557
558 if (nextDelegateInStack.stage === ApplicationInfoInterface.MainStage) {
559 // if the next app in stack is a main stage app, put the sidestage on top of it.
560 return 2;
561 }
562 return 1;
563 }
564
565 return 1;
566 }
567
568 onShownChanged: {
569 if (!shown && priv.mainStageDelegate) {
570 priv.mainStageDelegate.claimFocus();
571 }
572 }
573
574 DropArea {
575 id: sideStageDropArea
576 objectName: "SideStageDropArea"
577 anchors.fill: parent
578
579 property bool dropAllowed: true
580
581 onEntered: {
582 dropAllowed = drag.keys != "Disabled";
583 }
584 onExited: {
585 dropAllowed = true;
586 }
587 onDropped: {
588 if (drop.keys == "MainStage") {
589 drop.source.appDelegate.saveStage(ApplicationInfoInterface.SideStage);
590 drop.source.appDelegate.focus = true;
591 }
592 }
593 drag {
594 onSourceChanged: {
595 if (!sideStageDropArea.drag.source) {
596 dropAllowed = true;
597 }
598 }
599 }
600 }
249 }601 }
250602
251 TopLevelSurfaceRepeater {603 TopLevelSurfaceRepeater {
@@ -256,6 +608,7 @@
256 delegate: FocusScope {608 delegate: FocusScope {
257 id: appDelegate609 id: appDelegate
258 objectName: "appDelegate_" + model.id610 objectName: "appDelegate_" + model.id
611 property int itemIndex: index // We need this from outside the repeater
259 // z might be overriden in some cases by effects, but we need z ordering612 // z might be overriden in some cases by effects, but we need z ordering
260 // to calculate occlusion detection613 // to calculate occlusion detection
261 property int normalZ: topLevelSurfaceList.count - index614 property int normalZ: topLevelSurfaceList.count - index
@@ -265,10 +618,33 @@
265 }618 }
266 }619 }
267 z: normalZ620 z: normalZ
268 x: requestedX // may be overridden in some states. Do not directly write to this.621
269 y: requestedY // may be overridden in some states. Do not directly write to this.622 // Normally we want x/y where we request it to be. Width/height of our delegate will
270 property real requestedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.x + units.gu(3) : (normalZ - 1) * units.gu(3)623 // match what the actual surface size is.
271 property real requestedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.y + units.gu(3) : normalZ * units.gu(3)624 // Don't write to those, they will be set by states
625 x: requestedX
626 y: requestedY
627 width: decoratedWindow.implicitWidth
628 height: decoratedWindow.implicitHeight
629
630 // requestedX/Y/width/height is what we ask the actual surface to be.
631 // Do not write to those, they will be set by states
632 property real requestedX: windowedX
633 property real requestedY: windowedY
634 property real requestedWidth: windowedWidth
635 property real requestedHeight: windowedHeight
636
637 // In those are for windowed mode. Those values basically store the window's properties
638 // when having a floating window. If you want to move/resize a window in normal mode, this is what you want to write to.
639 property real windowedX
640 property real windowedY
641 property real windowedWidth
642 property real windowedHeight
643
644 // unlike windowedX/Y, this is the last known grab position before being pushed against edges/corners
645 // when restoring, the window should return to these, not to the place where it was dropped near the edge
646 property real restoredX
647 property real restoredY
272648
273 Binding {649 Binding {
274 target: appDelegate650 target: appDelegate
@@ -277,27 +653,24 @@
277 Math.min(appDelegate.requestedY - PanelState.panelHeight,653 Math.min(appDelegate.requestedY - PanelState.panelHeight,
278 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))654 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
279 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")655 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
280 && SurfaceManager.inputMethodSurface656 && root.inputMethodRect.height > 0
281 && SurfaceManager.inputMethodSurface.state != Mir.HiddenState
282 && SurfaceManager.inputMethodSurface.state != Mir.MinimizedState
283657
284 }658 }
285659
286 width: decoratedWindow.width660 Behavior on x { id: xBehavior; enabled: priv.closingIndex >= 0; UbuntuNumberAnimation { onRunningChanged: if (!running) priv.closingIndex = -1} }
287 height: decoratedWindow.height
288661
289 Connections {662 Connections {
290 target: root663 target: root
291 onShellOrientationAngleChanged: {664 onShellOrientationAngleChanged: {
292 // at this point decoratedWindow.surfaceOrientationAngle is the old shellOrientationAngle665 // at this point decoratedWindow.surfaceOrientationAngle is the old shellOrientationAngle
293 if (application && application.rotatesWindowContents) {666 if (application && application.rotatesWindowContents) {
294 if (state == "normal" || state == "restored") {667 if (root.state == "windowed") {
295 var angleDiff = decoratedWindow.surfaceOrientationAngle - shellOrientationAngle;668 var angleDiff = decoratedWindow.surfaceOrientationAngle - shellOrientationAngle;
296 angleDiff = (360 + angleDiff) % 360;669 angleDiff = (360 + angleDiff) % 360;
297 if (angleDiff === 90 || angleDiff === 270) {670 if (angleDiff === 90 || angleDiff === 270) {
298 var aux = decoratedWindow.requestedHeight;671 var aux = decoratedWindow.requestedHeight;
299 decoratedWindow.requestedHeight = decoratedWindow.requestedWidth + decoratedWindow.visibleDecorationHeight;672 decoratedWindow.requestedHeight = decoratedWindow.requestedWidth + decoratedWindow.decorationHeight;
300 decoratedWindow.requestedWidth = aux - decoratedWindow.visibleDecorationHeight;673 decoratedWindow.requestedWidth = aux - decoratedWindow.decorationHeight;
301 }674 }
302 }675 }
303 decoratedWindow.surfaceOrientationAngle = shellOrientationAngle;676 decoratedWindow.surfaceOrientationAngle = shellOrientationAngle;
@@ -306,6 +679,10 @@
306 }679 }
307 }680 }
308 }681 }
682 Connections {
683 target: priv
684 onSideStageEnabledChanged: refreshStage()
685 }
309686
310 readonly property alias application: decoratedWindow.application687 readonly property alias application: decoratedWindow.application
311 readonly property alias minimumWidth: decoratedWindow.minimumWidth688 readonly property alias minimumWidth: decoratedWindow.minimumWidth
@@ -314,8 +691,6 @@
314 readonly property alias maximumHeight: decoratedWindow.maximumHeight691 readonly property alias maximumHeight: decoratedWindow.maximumHeight
315 readonly property alias widthIncrement: decoratedWindow.widthIncrement692 readonly property alias widthIncrement: decoratedWindow.widthIncrement
316 readonly property alias heightIncrement: decoratedWindow.heightIncrement693 readonly property alias heightIncrement: decoratedWindow.heightIncrement
317 property int requestedWidth: -1
318 property int requestedHeight: -1
319694
320 readonly property bool maximized: windowState === WindowStateStorage.WindowStateMaximized695 readonly property bool maximized: windowState === WindowStateStorage.WindowStateMaximized
321 readonly property bool maximizedLeft: windowState === WindowStateStorage.WindowStateMaximizedLeft696 readonly property bool maximizedLeft: windowState === WindowStateStorage.WindowStateMaximizedLeft
@@ -330,7 +705,7 @@
330 maximizedTopLeft || maximizedTopRight || maximizedBottomLeft || maximizedBottomRight705 maximizedTopLeft || maximizedTopRight || maximizedBottomLeft || maximizedBottomRight
331706
332 readonly property bool minimized: windowState & WindowStateStorage.WindowStateMinimized707 readonly property bool minimized: windowState & WindowStateStorage.WindowStateMinimized
333 readonly property alias fullscreen: decoratedWindow.fullscreen708 readonly property bool fullscreen: surface ? surface.state === Mir.FullscreenState : application.fullscreen
334709
335 readonly property bool canBeMaximized: canBeMaximizedHorizontally && canBeMaximizedVertically710 readonly property bool canBeMaximized: canBeMaximizedHorizontally && canBeMaximizedVertically
336 readonly property bool canBeMaximizedLeftRight: (maximumWidth == 0 || maximumWidth >= appContainer.width/2) &&711 readonly property bool canBeMaximizedLeftRight: (maximumWidth == 0 || maximumWidth >= appContainer.width/2) &&
@@ -339,6 +714,7 @@
339 (maximumHeight == 0 || maximumHeight >= appContainer.height/2)714 (maximumHeight == 0 || maximumHeight >= appContainer.height/2)
340 readonly property bool canBeMaximizedHorizontally: maximumWidth == 0 || maximumWidth >= appContainer.width715 readonly property bool canBeMaximizedHorizontally: maximumWidth == 0 || maximumWidth >= appContainer.width
341 readonly property bool canBeMaximizedVertically: maximumHeight == 0 || maximumHeight >= appContainer.height716 readonly property bool canBeMaximizedVertically: maximumHeight == 0 || maximumHeight >= appContainer.height
717 readonly property alias orientationChangesEnabled: decoratedWindow.orientationChangesEnabled
342718
343 property int windowState: WindowStateStorage.WindowStateNormal719 property int windowState: WindowStateStorage.WindowStateNormal
344 property bool animationsEnabled: true720 property bool animationsEnabled: true
@@ -347,23 +723,45 @@
347 property bool visuallyMaximized: false723 property bool visuallyMaximized: false
348 property bool visuallyMinimized: false724 property bool visuallyMinimized: false
349725
726 property int stage: ApplicationInfoInterface.MainStage
727 function saveStage(newStage) {
728 appDelegate.stage = newStage;
729 WindowStateStorage.saveStage(appId, newStage);
730 priv.updateMainAndSideStageIndexes()
731 }
732
350 readonly property var surface: model.surface733 readonly property var surface: model.surface
351 readonly property alias resizeArea: resizeArea734 readonly property alias resizeArea: resizeArea
352 readonly property alias focusedSurface: decoratedWindow.focusedSurface735 readonly property alias focusedSurface: decoratedWindow.focusedSurface
353 readonly property bool dragging: touchControls.overlayShown ? touchControls.dragging : decoratedWindow.dragging736 readonly property bool dragging: touchControls.overlayShown ? touchControls.dragging : decoratedWindow.dragging
354737
355 readonly property bool isDash: model.application.appId == "unity8-dash"738 readonly property string appId: model.application.appId
739 readonly property bool isDash: appId == "unity8-dash"
356 readonly property alias clientAreaItem: decoratedWindow.clientAreaItem740 readonly property alias clientAreaItem: decoratedWindow.clientAreaItem
357741
358 function claimFocus() {742 function claimFocus() {
359 if (spread.state == "altTab") {743 if (root.state == "spread") {
360 spread.cancel();744 spreadItem.highlightedIndex = index
361 }745 priv.goneToSpread = false;
362 appDelegate.restore(true /* animated */, appDelegate.windowState);746 }
747 if (root.mode == "stagedWithSideStage") {
748 if (appDelegate.stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
749 sideStage.show();
750 }
751 priv.updateMainAndSideStageIndexes();
752 }
753
754 if (root.mode == "windowed") {
755 appDelegate.restore(true /* animated */, appDelegate.windowState);
756 } else {
757 appDelegate.focus = true;
758 }
363 }759 }
364 Connections {760 Connections {
365 target: model.surface761 target: model.surface
366 onFocusRequested: claimFocus();762 onFocusRequested: {
763 claimFocus();
764 }
367 }765 }
368 Connections {766 Connections {
369 target: model.application767 target: model.application
@@ -383,14 +781,9 @@
383 return;781 return;
384782
385 if (focus) {783 if (focus) {
386 // If we're orphan (!parent) it means this stage is no longer the current one784 topLevelSurfaceList.raiseId(model.id);
387 // and will be deleted shortly. So we should no longer have a say over the model
388 if (root.parent) {
389 topLevelSurfaceList.raiseId(model.id);
390 }
391
392 priv.focusedAppDelegate = appDelegate;785 priv.focusedAppDelegate = appDelegate;
393 } else if (!focus && priv.focusedAppDelegate === appDelegate) {786 } else if (!focus && priv.focusedAppDelegate === appDelegate && root.state != "spread") {
394 priv.focusedAppDelegate = null;787 priv.focusedAppDelegate = null;
395 // FIXME: No idea why the Binding{} doens't update when focusedAppDelegate turns null788 // FIXME: No idea why the Binding{} doens't update when focusedAppDelegate turns null
396 MirFocusController.focusedSurface = null;789 MirFocusController.focusedSurface = null;
@@ -403,13 +796,25 @@
403 decoratedWindow.surfaceOrientationAngle = 0;796 decoratedWindow.surfaceOrientationAngle = 0;
404 }797 }
405798
799 // First, cascade the newly created window, relative to the currently/old focused window.
800 windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
801 windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
802 // Now load any saved state. This needs to happen *after* the cascading!
803 resizeArea.loadWindowState();
804
406 // NB: We're differentiating if this delegate was created in response to a new entry in the model805 // NB: We're differentiating if this delegate was created in response to a new entry in the model
407 // or if the Repeater is just populating itself with delegates to match the model it received.806 // or if the Repeater is just populating itself with delegates to match the model it received.
408 if (!appRepeater.startingUp) {807 if (!appRepeater.startingUp) {
409 // a top level window is always the focused one when it first appears, unfocusing808 // a top level window is always the focused one when it first appears, unfocusing
410 // any preexisting one809 // any preexisting one
411 focus = true;810 if (root.state == "spread") {
811 spreadItem.highlightedIndex = index;
812 }
813 claimFocus();
412 }814 }
815
816 refreshStage();
817 _constructing = false;
413 }818 }
414 Component.onDestruction: {819 Component.onDestruction: {
415 if (!root.parent) {820 if (!root.parent) {
@@ -435,13 +840,20 @@
435840
436 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()841 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
437842
843 property bool _constructing: true;
844 onStageChanged: {
845 if (!_constructing) {
846 priv.updateMainAndSideStageIndexes();
847 }
848 }
849
438 visible: (850 visible: (
439 !visuallyMinimized851 !visuallyMinimized
440 && !greeter.fullyShown852 && !greeter.fullyShown
441 && (priv.foregroundMaximizedAppDelegate === null || priv.foregroundMaximizedAppDelegate.normalZ <= z)853 && (priv.foregroundMaximizedAppDelegate === null || priv.foregroundMaximizedAppDelegate.normalZ <= z)
442 )854 )
443 || decoratedWindow.fullscreen855 || appDelegate.fullscreen
444 || (spread.state == "altTab" && index === spread.highlightedIndex)856 || focusAnimation.running || rightEdgeFocusAnimation.running || hidingAnimation.running
445857
446 function close() {858 function close() {
447 model.surface.close();859 model.surface.close();
@@ -499,7 +911,44 @@
499 }911 }
500912
501 function playFocusAnimation() {913 function playFocusAnimation() {
502 focusAnimation.start()914 if (state == "stagedRightEdge") {
915 // TODO: Can we drop this if and find something that always works?
916 if (root.mode == "staged") {
917 rightEdgeFocusAnimation.targetX = 0
918 rightEdgeFocusAnimation.start()
919 } else if (root.mode == "stagedWithSideStage") {
920 rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
921 rightEdgeFocusAnimation.start()
922 }
923 } else if (state == "windowedRightEdge" || state == "windowed") {
924 claimFocus();
925 } else {
926 focusAnimation.start()
927 }
928 }
929 function playHidingAnimation() {
930 if (state != "windowedRightEdge") {
931 hidingAnimation.start()
932 }
933 }
934
935 function refreshStage() {
936 var newStage = ApplicationInfoInterface.MainStage;
937 if (priv.sideStageEnabled) { // we're in lanscape rotation.
938 if (!isDash && application && application.supportedOrientations & (Qt.PortraitOrientation|Qt.InvertedPortraitOrientation)) {
939 var defaultStage = ApplicationInfoInterface.SideStage; // if application supports portrait, it defaults to sidestage.
940 if (application.supportedOrientations & (Qt.LandscapeOrientation|Qt.InvertedLandscapeOrientation)) {
941 // if it supports lanscape, it defaults to mainstage.
942 defaultStage = ApplicationInfoInterface.MainStage;
943 }
944 newStage = WindowStateStorage.getStage(application.appId, defaultStage);
945 }
946 }
947
948 stage = newStage;
949 if (focus && stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
950 sideStage.show();
951 }
503 }952 }
504953
505 UbuntuNumberAnimation {954 UbuntuNumberAnimation {
@@ -509,32 +958,255 @@
509 from: 0.98958 from: 0.98
510 to: 1959 to: 1
511 duration: UbuntuAnimation.SnapDuration960 duration: UbuntuAnimation.SnapDuration
512 }961 onStarted: {
513962 topLevelSurfaceList.raiseId(model.id);
514 // unlike requestedX/Y, this is the last known grab position before being pushed against edges/corners963 }
515 // when restoring, the window should return to these, not to the place where it was dropped near the edge964 onStopped: {
516 property real restoredX965 appDelegate.claimFocus();
517 property real restoredY966 }
967 }
968 ParallelAnimation {
969 id: rightEdgeFocusAnimation
970 property int targetX: 0
971 UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: rightEdgeFocusAnimation.targetX; duration: priv.animationDuration }
972 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
973 UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
974 onStopped: {
975 appDelegate.focus = true
976 }
977 }
978 ParallelAnimation {
979 id: hidingAnimation
980 UbuntuNumberAnimation { target: appDelegate; property: "opacity"; to: 0; duration: priv.animationDuration }
981 onStopped: appDelegate.opacity = 1
982 }
983
984 SpreadMaths {
985 id: spreadMaths
986 spread: spreadItem
987 itemIndex: index
988 flickable: floatingFlickable
989 }
990 StageMaths {
991 id: stageMaths
992 sceneWidth: root.width
993 stage: appDelegate.stage
994 thisDelegate: appDelegate
995 mainStageDelegate: priv.mainStageDelegate
996 sideStageDelegate: priv.sideStageDelegate
997 sideStageWidth: sideStage.panelWidth
998 sideStageX: sideStage.x
999 itemIndex: appDelegate.itemIndex
1000 nextInStack: priv.nextInStack
1001 leftEdgeDragProgress: root.leftEdgeDragProgress
1002 }
1003
1004 StagedRightEdgeMaths {
1005 id: stagedRightEdgeMaths
1006 sceneWidth: appContainer.width - root.leftMargin
1007 sceneHeight: appContainer.height
1008 isMainStageApp: priv.mainStageDelegate == appDelegate
1009 isSideStageApp: priv.sideStageDelegate == appDelegate
1010 sideStageWidth: sideStage.width
1011 sideStageOpen: sideStage.shown
1012 itemIndex: index
1013 nextInStack: priv.nextInStack
1014 progress: 0
1015 targetHeight: spreadItem.stackHeight
1016 targetX: spreadMaths.targetX
1017 startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
1018 targetY: spreadMaths.targetY
1019 targetAngle: spreadMaths.targetAngle
1020 targetScale: spreadMaths.targetScale
1021 shuffledZ: stageMaths.itemZ
1022 breakPoint: spreadItem.rightEdgeBreakPoint
1023 }
1024
1025 WindowedRightEdgeMaths {
1026 id: windowedRightEdgeMaths
1027 itemIndex: index
1028 startWidth: appDelegate.requestedWidth
1029 startHeight: appDelegate.requestedHeight
1030 targetHeight: spreadItem.stackHeight
1031 targetX: spreadMaths.targetX
1032 targetY: spreadMaths.targetY
1033 normalZ: appDelegate.normalZ
1034 targetAngle: spreadMaths.targetAngle
1035 targetScale: spreadMaths.targetScale
1036 breakPoint: spreadItem.rightEdgeBreakPoint
1037 }
5181038
519 states: [1039 states: [
520 State {1040 State {
1041 name: "spread"; when: root.state == "spread"
1042 PropertyChanges {
1043 target: decoratedWindow;
1044 showDecoration: false;
1045 angle: spreadMaths.targetAngle
1046 itemScale: spreadMaths.targetScale
1047 scaleToPreviewSize: spreadItem.stackHeight
1048 scaleToPreviewProgress: 1
1049 hasDecoration: root.mode === "windowed"
1050 shadowOpacity: spreadMaths.shadowOpacity
1051 showHighlight: spreadItem.highlightedIndex === index
1052 darkening: spreadItem.highlightedIndex >= 0
1053 anchors.topMargin: dragArea.distance
1054 }
1055 PropertyChanges {
1056 target: appDelegate
1057 x: spreadMaths.targetX
1058 y: spreadMaths.targetY
1059 z: index
1060 height: spreadItem.spreadItemHeight
1061 requestedWidth: decoratedWindow.oldRequestedWidth
1062 requestedHeight: decoratedWindow.oldRequestedHeight
1063 visible: spreadMaths.itemVisible
1064 }
1065 PropertyChanges { target: dragArea; enabled: true }
1066 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
1067 },
1068 State {
1069 name: "stagedRightEdge"
1070 when: (root.mode == "staged" || root.mode == "stagedWithSideStage") && (root.state == "sideStagedRightEdge" || root.state == "stagedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running)
1071 PropertyChanges {
1072 target: stagedRightEdgeMaths
1073 progress: Math.max(edgeBarrier.progress, rightEdgeDragArea.draggedProgress)
1074 }
1075 PropertyChanges {
1076 target: appDelegate
1077 x: stagedRightEdgeMaths.animatedX
1078 y: stagedRightEdgeMaths.animatedY
1079 z: stagedRightEdgeMaths.animatedZ
1080 height: stagedRightEdgeMaths.animatedHeight
1081 requestedWidth: decoratedWindow.oldRequestedWidth
1082 requestedHeight: decoratedWindow.oldRequestedHeight
1083 visible: appDelegate.x < root.width
1084 }
1085 PropertyChanges {
1086 target: decoratedWindow
1087 hasDecoration: false
1088 angle: stagedRightEdgeMaths.animatedAngle
1089 itemScale: stagedRightEdgeMaths.animatedScale
1090 scaleToPreviewSize: spreadItem.stackHeight
1091 scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
1092 shadowOpacity: .3
1093 }
1094 },
1095 State {
1096 name: "windowedRightEdge"
1097 when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || edgeBarrier.progress > 0)
1098 PropertyChanges {
1099 target: windowedRightEdgeMaths
1100 progress: Math.max(rightEdgeDragArea.progress, edgeBarrier.progress)
1101 }
1102 PropertyChanges {
1103 target: appDelegate
1104 x: windowedRightEdgeMaths.animatedX
1105 y: windowedRightEdgeMaths.animatedY
1106 z: windowedRightEdgeMaths.animatedZ
1107 height: stagedRightEdgeMaths.animatedHeight
1108 requestedWidth: decoratedWindow.oldRequestedWidth
1109 requestedHeight: decoratedWindow.oldRequestedHeight
1110 }
1111 PropertyChanges {
1112 target: decoratedWindow
1113 showDecoration: windowedRightEdgeMaths.decorationHeight
1114 angle: windowedRightEdgeMaths.animatedAngle
1115 itemScale: windowedRightEdgeMaths.animatedScale
1116 scaleToPreviewSize: spreadItem.stackHeight
1117 scaleToPreviewProgress: windowedRightEdgeMaths.scaleToPreviewProgress
1118 shadowOpacity: .3
1119 }
1120 PropertyChanges {
1121 target: opacityEffect;
1122 opacityValue: windowedRightEdgeMaths.opacityMask
1123 sourceItem: windowedRightEdgeMaths.opacityMask < 1 ? decoratedWindow : null
1124 }
1125 },
1126 State {
1127 name: "staged"; when: root.state == "staged"
1128 PropertyChanges {
1129 target: appDelegate
1130 x: stageMaths.itemX
1131 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
1132 requestedWidth: appContainer.width
1133 requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
1134 visuallyMaximized: true
1135 visible: appDelegate.x < root.width
1136 }
1137 PropertyChanges {
1138 target: decoratedWindow
1139 hasDecoration: false
1140 }
1141 PropertyChanges {
1142 target: resizeArea
1143 enabled: false
1144 }
1145 PropertyChanges {
1146 target: stageMaths
1147 animateX: !focusAnimation.running && itemIndex !== spreadItem.highlightedIndex
1148 }
1149 },
1150 State {
1151 name: "stagedWithSideStage"; when: root.state == "stagedWithSideStage"
1152 PropertyChanges {
1153 target: stageMaths
1154 itemIndex: index
1155 }
1156 PropertyChanges {
1157 target: appDelegate
1158 x: stageMaths.itemX
1159 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
1160 z: stageMaths.itemZ
1161 requestedWidth: stageMaths.itemWidth
1162 requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
1163 visuallyMaximized: true
1164 visible: appDelegate.x < root.width
1165 }
1166 PropertyChanges {
1167 target: decoratedWindow
1168 hasDecoration: false
1169 }
1170 PropertyChanges {
1171 target: resizeArea
1172 enabled: false
1173 }
1174 },
1175 State {
1176 name: "maximized"; when: appDelegate.windowState == WindowStateStorage.WindowStateMaximized
1177 PropertyChanges {
1178 target: appDelegate;
1179 requestedX: root.leftMargin;
1180 requestedY: 0;
1181 visuallyMinimized: false;
1182 visuallyMaximized: true
1183 requestedWidth: appContainer.width - root.leftMargin;
1184 requestedHeight: appContainer.height;
1185 }
1186 PropertyChanges { target: touchControls; enabled: true }
1187 },
1188 State {
521 name: "fullscreen"; when: appDelegate.fullscreen && !appDelegate.minimized1189 name: "fullscreen"; when: appDelegate.fullscreen && !appDelegate.minimized
522 PropertyChanges {1190 PropertyChanges {
523 target: appDelegate;1191 target: appDelegate;
524 x: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? -PanelState.panelHeight : PanelState.panelHeight)1192 requestedX: 0
525 y: rotation == 0 ? -PanelState.panelHeight : (parent.height - height) / 21193 requestedY: 0
526 requestedWidth: appContainer.width;1194 requestedWidth: appContainer.width;
527 requestedHeight: appContainer.height;1195 requestedHeight: appContainer.height;
528 }1196 }
1197 PropertyChanges { target: decoratedWindow; hasDecoration: false }
529 },1198 },
530 State {1199 State {
531 name: "normal";1200 name: "normal";
532 when: appDelegate.windowState == WindowStateStorage.WindowStateNormal1201 when: appDelegate.windowState == WindowStateStorage.WindowStateNormal
533 PropertyChanges {1202 PropertyChanges {
534 target: appDelegate;1203 target: appDelegate
535 visuallyMinimized: false;1204 visuallyMinimized: false
536 visuallyMaximized: false1205 visuallyMaximized: false
537 }1206 }
1207 PropertyChanges { target: touchControls; enabled: true }
1208 PropertyChanges { target: resizeArea; enabled: true }
1209 PropertyChanges { target: decoratedWindow; shadowOpacity: .3}
538 },1210 },
539 State {1211 State {
540 name: "restored";1212 name: "restored";
@@ -542,30 +1214,25 @@
542 extend: "normal"1214 extend: "normal"
543 PropertyChanges {1215 PropertyChanges {
544 target: appDelegate;1216 target: appDelegate;
545 requestedX: restoredX;1217 windowedX: restoredX;
546 requestedY: restoredY;1218 windowedY: restoredY;
547 }1219 }
548 },1220 },
549 State {1221 State {
550 name: "maximized"; when: appDelegate.maximized && !appDelegate.minimized1222 name: "semiMaximized"
551 PropertyChanges {1223 PropertyChanges { target: touchControls; enabled: true }
552 target: appDelegate;1224 PropertyChanges { target: resizeArea; enabled: true }
553 requestedX: root.leftMargin;1225 PropertyChanges { target: decoratedWindow; shadowOpacity: .3 }
554 requestedY: 0;
555 requestedWidth: appContainer.width - root.leftMargin;
556 requestedHeight: appContainer.height;
557 visuallyMinimized: false;
558 visuallyMaximized: true
559 }
560 },1226 },
561 State {1227 State {
562 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized1228 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
1229 extend: "semiMaximized"
563 PropertyChanges {1230 PropertyChanges {
564 target: appDelegate1231 target: appDelegate
565 requestedX: root.leftMargin1232 windowedX: root.leftMargin
566 requestedY: PanelState.panelHeight1233 windowedY: PanelState.panelHeight
567 requestedWidth: (appContainer.width - root.leftMargin)/21234 windowedWidth: (appContainer.width - root.leftMargin)/2
568 requestedHeight: appContainer.height - PanelState.panelHeight1235 windowedHeight: appContainer.height - PanelState.panelHeight
569 }1236 }
570 },1237 },
571 State {1238 State {
@@ -573,17 +1240,18 @@
573 extend: "maximizedLeft"1240 extend: "maximizedLeft"
574 PropertyChanges {1241 PropertyChanges {
575 target: appDelegate;1242 target: appDelegate;
576 requestedX: (appContainer.width + root.leftMargin)/21243 windowedX: (appContainer.width + root.leftMargin)/2
577 }1244 }
578 },1245 },
579 State {1246 State {
580 name: "maximizedTopLeft"; when: appDelegate.maximizedTopLeft && !appDelegate.minimized1247 name: "maximizedTopLeft"; when: appDelegate.maximizedTopLeft && !appDelegate.minimized
1248 extend: "semiMaximized"
581 PropertyChanges {1249 PropertyChanges {
582 target: appDelegate1250 target: appDelegate
583 requestedX: root.leftMargin1251 windowedX: root.leftMargin
584 requestedY: PanelState.panelHeight1252 windowedY: PanelState.panelHeight
585 requestedWidth: (appContainer.width - root.leftMargin)/21253 windowedWidth: (appContainer.width - root.leftMargin)/2
586 requestedHeight: (appContainer.height - PanelState.panelHeight)/21254 windowedHeight: (appContainer.height - PanelState.panelHeight)/2
587 }1255 }
588 },1256 },
589 State {1257 State {
@@ -591,17 +1259,18 @@
591 extend: "maximizedTopLeft"1259 extend: "maximizedTopLeft"
592 PropertyChanges {1260 PropertyChanges {
593 target: appDelegate1261 target: appDelegate
594 requestedX: (appContainer.width + root.leftMargin)/21262 windowedX: (appContainer.width + root.leftMargin)/2
595 }1263 }
596 },1264 },
597 State {1265 State {
598 name: "maximizedBottomLeft"; when: appDelegate.maximizedBottomLeft && !appDelegate.minimized1266 name: "maximizedBottomLeft"; when: appDelegate.maximizedBottomLeft && !appDelegate.minimized
1267 extend: "semiMaximized"
599 PropertyChanges {1268 PropertyChanges {
600 target: appDelegate1269 target: appDelegate
601 requestedX: root.leftMargin1270 windowedX: root.leftMargin
602 requestedY: (appContainer.height + PanelState.panelHeight)/21271 windowedY: (appContainer.height + PanelState.panelHeight)/2
603 requestedWidth: (appContainer.width - root.leftMargin)/21272 windowedWidth: (appContainer.width - root.leftMargin)/2
604 requestedHeight: appContainer.height/21273 windowedHeight: appContainer.height/2
605 }1274 }
606 },1275 },
607 State {1276 State {
@@ -609,35 +1278,52 @@
609 extend: "maximizedBottomLeft"1278 extend: "maximizedBottomLeft"
610 PropertyChanges {1279 PropertyChanges {
611 target: appDelegate1280 target: appDelegate
612 requestedX: (appContainer.width + root.leftMargin)/21281 windowedX: (appContainer.width + root.leftMargin)/2
613 }1282 }
614 },1283 },
615 State {1284 State {
616 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized1285 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
617 PropertyChanges { target: appDelegate; requestedX: root.leftMargin; requestedY: requestedY; requestedWidth: appContainer.width - root.leftMargin }1286 extend: "semiMaximized"
1287 PropertyChanges { target: appDelegate; requestedX: root.leftMargin; requestedY: windowedY;
1288 requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appDelegate.windowedHeight }
618 },1289 },
619 State {1290 State {
620 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized1291 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
621 PropertyChanges { target: appDelegate; requestedX: requestedX; requestedY: PanelState.panelHeight; requestedHeight: appContainer.height - PanelState.panelHeight }1292 extend: "semiMaximized"
1293 PropertyChanges { target: appDelegate; requestedX: windowedX; requestedY: PanelState.panelHeight;
1294 requestedWidth: appDelegate.windowedWidth; requestedHeight: appContainer.height - PanelState.panelHeight }
622 },1295 },
623 State {1296 State {
624 name: "minimized"; when: appDelegate.minimized1297 name: "minimized"; when: appDelegate.minimized
625 PropertyChanges {1298 PropertyChanges {
626 target: appDelegate;1299 target: appDelegate
627 requestedX: -appDelegate.width / 2;1300 requestedX: -appDelegate.width / 2
628 scale: units.gu(5) / appDelegate.width;1301 scale: units.gu(5) / appDelegate.width
629 opacity: 0;1302 opacity: 0;
630 visuallyMinimized: true;1303 visuallyMinimized: true
631 visuallyMaximized: false1304 visuallyMaximized: false
632 }1305 }
633 }1306 }
634 ]1307 ]
635 transitions: [1308 transitions: [
636 Transition {1309 Transition {
1310 from: "staged,stagedWithSideStage"; to: "normal"
1311 enabled: appDelegate.animationsEnabled
1312 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
1313 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
1314 },
1315 Transition {
1316 from: "normal,maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight";
1317 to: "staged,stagedWithSideStage"
1318 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
1319 },
1320 Transition {
1321 from: "maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight,minimized";
637 to: "normal,restored"1322 to: "normal,restored"
638 enabled: appDelegate.animationsEnabled1323 enabled: appDelegate.animationsEnabled
639 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }1324 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
640 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight" }1325 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,requestedWidth,requestedHeight,windowedWidth,windowedHeight,scale";
1326 duration: priv.animationDuration }
641 },1327 },
642 Transition {1328 Transition {
643 to: "minimized"1329 to: "minimized"
@@ -657,11 +1343,60 @@
657 }1343 }
658 },1344 },
659 Transition {1345 Transition {
660 to: "*" //maximized and fullscreen1346 to: "spread"
1347 // DecoratedWindow wants the scaleToPreviewSize set before enabling scaleToPreview
1348 PropertyAction { target: appDelegate; properties: "z,visible" }
1349 PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
1350 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
1351 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle,scaleToPreviewProgress"; duration: priv.animationDuration }
1352 },
1353 Transition {
1354 from: "normal,staged"; to: "stagedWithSideStage"
1355 UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
1356 UbuntuNumberAnimation { target: appDelegate; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration }
1357 },
1358 Transition {
1359 to: "windowedRightEdge"
1360 ScriptAction {
1361 script: {
1362 windowedRightEdgeMaths.startX = appDelegate.requestedX
1363 windowedRightEdgeMaths.startY = appDelegate.requestedY
1364
1365 if (index == 1) {
1366 var thisRect = { x: appDelegate.windowedX, y: appDelegate.windowedY, width: appDelegate.requestedWidth, height: appDelegate.requestedHeight }
1367 var otherDelegate = appRepeater.itemAt(0);
1368 var otherRect = { x: otherDelegate.windowedX, y: otherDelegate.windowedY, width: otherDelegate.requestedWidth, height: otherDelegate.requestedHeight }
1369 var intersectionRect = MathUtils.intersectionRect(thisRect, otherRect)
1370 var mappedInterSectionRect = appDelegate.mapFromItem(root, intersectionRect.x, intersectionRect.y)
1371 opacityEffect.maskX = mappedInterSectionRect.x
1372 opacityEffect.maskY = mappedInterSectionRect.y
1373 opacityEffect.maskWidth = intersectionRect.width
1374 opacityEffect.maskHeight = intersectionRect.height
1375 }
1376 }
1377 }
1378 },
1379 Transition {
1380 from: "stagedRightEdge"; to: "staged"
1381 enabled: rightEdgeDragArea.cancelled // only transition back to state if the gesture was cancelled, in the other cases we play the focusAnimations.
1382 SequentialAnimation {
1383 ParallelAnimation {
1384 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height,width,scale"; duration: priv.animationDuration }
1385 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle,scaleToPreviewProgress"; duration: priv.animationDuration }
1386 }
1387 // We need to release scaleToPreviewSize at last
1388 PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
1389 PropertyAction { target: appDelegate; property: "visible" }
1390 }
1391 },
1392 Transition {
1393 from: "normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1394 to: "normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTop,maximizedBottom,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
661 enabled: appDelegate.animationsEnabled1395 enabled: appDelegate.animationsEnabled
662 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
663 SequentialAnimation {1396 SequentialAnimation {
664 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight" }1397 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1398 UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,windowedX,windowedY,opacity,scale,requestedWidth,requestedHeight,windowedWidth,windowedHeight";
1399 duration: priv.animationDuration }
665 PropertyAction { target: appDelegate; property: "visuallyMaximized" }1400 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
666 ScriptAction { script: { fakeRectangle.stop(); } }1401 ScriptAction { script: { fakeRectangle.stop(); } }
667 }1402 }
@@ -669,14 +1404,6 @@
669 ]1404 ]
6701405
671 Binding {1406 Binding {
672 id: previewBinding
673 target: appDelegate
674 property: "z"
675 value: topLevelSurfaceList.count + 1
676 when: index == spread.highlightedIndex && spread.ready
677 }
678
679 Binding {
680 target: PanelState1407 target: PanelState
681 property: "buttonsAlwaysVisible"1408 property: "buttonsAlwaysVisible"
682 value: appDelegate && appDelegate.maximized && touchControls.overlayShown1409 value: appDelegate && appDelegate.maximized && touchControls.overlayShown
@@ -697,26 +1424,15 @@
697 screenWidth: appContainer.width1424 screenWidth: appContainer.width
698 screenHeight: appContainer.height1425 screenHeight: appContainer.height
699 leftMargin: root.leftMargin1426 leftMargin: root.leftMargin
7001427 enabled: false
701 onPressed: { appDelegate.focus = true; }1428 visible: enabled
7021429
703 Component.onCompleted: {1430 onPressed: {
704 loadWindowState();1431 appDelegate.focus = true;
705 }1432 }
7061433
707 property bool saveStateOnDestruction: true
708 Connections {
709 target: root
710 onStageAboutToBeUnloaded: {
711 resizeArea.saveWindowState();
712 resizeArea.saveStateOnDestruction = false;
713 fullscreenPolicy.active = false;
714 }
715 }
716 Component.onDestruction: {1434 Component.onDestruction: {
717 if (saveStateOnDestruction) {1435 saveWindowState();
718 saveWindowState();
719 }
720 }1436 }
721 }1437 }
7221438
@@ -729,14 +1445,25 @@
729 surface: model.surface1445 surface: model.surface
730 active: appDelegate.focus1446 active: appDelegate.focus
731 focus: true1447 focus: true
1448 interactive: root.interactive
1449 showDecoration: 1
732 maximizeButtonShown: appDelegate.canBeMaximized1450 maximizeButtonShown: appDelegate.canBeMaximized
733 overlayShown: touchControls.overlayShown1451 overlayShown: touchControls.overlayShown
1452 width: implicitWidth
1453 height: implicitHeight
1454 highlightSize: windowInfoItem.iconMargin / 2
734 stageWidth: appContainer.width1455 stageWidth: appContainer.width
735 stageHeight: appContainer.height1456 stageHeight: appContainer.height
7361457
737 requestedWidth: appDelegate.requestedWidth1458 requestedWidth: appDelegate.requestedWidth
738 requestedHeight: appDelegate.requestedHeight1459 requestedHeight: appDelegate.requestedHeight
7391460
1461 property int oldRequestedWidth: -1
1462 property int oldRequestedHeight: -1
1463
1464 onRequestedWidthChanged: oldRequestedWidth = requestedWidth
1465 onRequestedHeightChanged: oldRequestedHeight = requestedHeight
1466
740 onCloseClicked: { appDelegate.close(); }1467 onCloseClicked: { appDelegate.close(); }
741 onMaximizeClicked: appDelegate.anyMaximized ? appDelegate.restoreFromMaximized() : appDelegate.maximize();1468 onMaximizeClicked: appDelegate.anyMaximized ? appDelegate.restoreFromMaximized() : appDelegate.maximize();
742 onMaximizeHorizontallyClicked: appDelegate.maximizedHorizontally ? appDelegate.restoreFromMaximized() : appDelegate.maximizeHorizontally()1469 onMaximizeHorizontallyClicked: appDelegate.maximizedHorizontally ? appDelegate.restoreFromMaximized() : appDelegate.maximizeHorizontally()
@@ -744,11 +1471,34 @@
744 onMinimizeClicked: appDelegate.minimize()1471 onMinimizeClicked: appDelegate.minimize()
745 onDecorationPressed: { appDelegate.focus = true; }1472 onDecorationPressed: { appDelegate.focus = true; }
746 onDecorationReleased: fakeRectangle.commit();1473 onDecorationReleased: fakeRectangle.commit();
1474
1475 property real angle: 0
1476 property real itemScale: 1
1477 transform: [
1478 Scale {
1479 origin.x: 0
1480 origin.y: decoratedWindow.implicitHeight / 2
1481 xScale: decoratedWindow.itemScale
1482 yScale: decoratedWindow.itemScale
1483 },
1484 Rotation {
1485 origin { x: 0; y: (decoratedWindow.height / 2) }
1486 axis { x: 0; y: 1; z: 0 }
1487 angle: decoratedWindow.angle
1488 }
1489 ]
1490 }
1491
1492 OpacityMask {
1493 id: opacityEffect
1494 anchors.fill: decoratedWindow
747 }1495 }
7481496
749 WindowControlsOverlay {1497 WindowControlsOverlay {
750 id: touchControls1498 id: touchControls
751 target: appDelegate1499 target: appDelegate
1500 enabled: false
1501 visible: enabled
752 stageWidth: appContainer.width1502 stageWidth: appContainer.width
753 stageHeight: appContainer.height1503 stageHeight: appContainer.height
7541504
@@ -764,9 +1514,89 @@
764 }1514 }
7651515
766 WindowedFullscreenPolicy {1516 WindowedFullscreenPolicy {
767 id: fullscreenPolicy1517 id: windowedFullscreenPolicy
768 active: true1518 active: root.mode == "windowed"
769 surface: model.surface1519 surface: model.surface
1520 }
1521 StagedFullscreenPolicy {
1522 id: stagedFullscreenPolicy
1523 active: root.mode == "staged" || root.mode == "stagedWithSideStage"
1524 surface: model.surface
1525 }
1526
1527 SpreadDelegateInputArea {
1528 id: dragArea
1529 objectName: "dragArea"
1530 anchors.fill: decoratedWindow
1531 enabled: false
1532 closeable: !appDelegate.isDash
1533
1534 onClicked: {
1535 spreadItem.highlightedIndex = index;
1536 if (distance == 0) {
1537 priv.goneToSpread = false;
1538 }
1539 }
1540 onClose: {
1541 priv.closingIndex = index
1542 if (model.surface) { // could be stopped by OOM
1543 model.surface.close()
1544 } else if (model.application) {
1545 root.applicationManager.stopApplication(model.application.appId);
1546 }
1547 }
1548 }
1549
1550 WindowInfoItem {
1551 id: windowInfoItem
1552 objectName: "windowInfoItem"
1553 anchors { left: parent.left; top: decoratedWindow.bottom; topMargin: units.gu(1) }
1554 title: model.application.name
1555 iconSource: model.application.icon
1556 height: spreadItem.appInfoHeight
1557 opacity: 0
1558 z: 1
1559 visible: opacity > 0
1560 maxWidth: {
1561 var nextApp = appRepeater.itemAt(index + 1);
1562 if (nextApp) {
1563 return nextApp.x - appDelegate.x - units.gu(1)
1564 }
1565 return appDelegate.width;
1566 }
1567
1568 onClicked: {
1569 spreadItem.highlightedIndex = index;
1570 priv.goneToSpread = false;
1571 }
1572 }
1573
1574 Image {
1575 id: closeImage
1576 anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 + spreadMaths.closeIconOffset }
1577 source: "graphics/window-close.svg"
1578 readonly property var mousePos: hoverMouseArea.mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
1579 visible: !appDelegate.isDash && dragArea.distance == 0
1580 && index == spreadItem.highlightedIndex
1581 && mousePos.y < (decoratedWindow.height / 3)
1582 && mousePos.y > -units.gu(4)
1583 && mousePos.x > -units.gu(4)
1584 && mousePos.x < (decoratedWindow.width * 2 / 3)
1585 height: units.gu(2)
1586 width: height
1587 sourceSize.width: width
1588 sourceSize.height: height
1589
1590 MouseArea {
1591 id: closeMouseArea
1592 objectName: "closeMouseArea"
1593 anchors.fill: closeImage
1594 anchors.margins: -units.gu(2)
1595 onClicked: {
1596 priv.closingIndex = index;
1597 appDelegate.close();
1598 }
1599 }
770 }1600 }
771 }1601 }
772 }1602 }
@@ -786,7 +1616,8 @@
786 // NB: it does its own positioning according to the specified edge1616 // NB: it does its own positioning according to the specified edge
787 edge: Qt.RightEdge1617 edge: Qt.RightEdge
7881618
789 onPassed: { spread.show(); }1619 onPassed: priv.goneToSpread = true;
1620
790 material: Component {1621 material: Component {
791 Item {1622 Item {
792 Rectangle {1623 Rectangle {
@@ -803,23 +1634,248 @@
803 }1634 }
804 }1635 }
8051636
1637 MouseArea {
1638 id: hoverMouseArea
1639 objectName: "hoverMouseArea"
1640 anchors.fill: appContainer
1641 propagateComposedEvents: true
1642 hoverEnabled: true
1643 enabled: false
1644 visible: enabled
1645
1646 property int scrollAreaWidth: width / 3
1647 property bool progressiveScrollingEnabled: false
1648
1649 onMouseXChanged: {
1650 mouse.accepted = false
1651
1652 if (hoverMouseArea.pressed) {
1653 return;
1654 }
1655
1656 // Find the hovered item and mark it active
1657 var mapped = mapToItem(appContainer, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
1658 var itemUnder = appContainer.childAt(mapped.x, mapped.y)
1659 if (itemUnder) {
1660 mapped = mapToItem(itemUnder, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
1661 var delegateChild = itemUnder.childAt(mapped.x, mapped.y)
1662 if (delegateChild && (delegateChild.objectName === "dragArea" || delegateChild.objectName === "windowInfoItem")) {
1663 spreadItem.highlightedIndex = appRepeater.indexOf(itemUnder)
1664 }
1665 }
1666
1667 if (floatingFlickable.contentWidth > floatingFlickable.width) {
1668 var margins = floatingFlickable.width * 0.05;
1669
1670 if (!progressiveScrollingEnabled && mouseX < floatingFlickable.width - scrollAreaWidth) {
1671 progressiveScrollingEnabled = true
1672 }
1673
1674 // do we need to scroll?
1675 if (mouseX < scrollAreaWidth + margins) {
1676 var progress = Math.min(1, (scrollAreaWidth + margins - mouseX) / (scrollAreaWidth - margins));
1677 var contentX = (1 - progress) * (floatingFlickable.contentWidth - floatingFlickable.width)
1678 floatingFlickable.contentX = Math.max(0, Math.min(floatingFlickable.contentX, contentX))
1679 }
1680 if (mouseX > floatingFlickable.width - scrollAreaWidth && progressiveScrollingEnabled) {
1681 var progress = Math.min(1, (mouseX - (floatingFlickable.width - scrollAreaWidth)) / (scrollAreaWidth - margins))
1682 var contentX = progress * (floatingFlickable.contentWidth - floatingFlickable.width)
1683 floatingFlickable.contentX = Math.min(floatingFlickable.contentWidth - floatingFlickable.width, Math.max(floatingFlickable.contentX, contentX))
1684 }
1685 }
1686 }
1687
1688 onPressed: mouse.accepted = false
1689 }
1690
1691 FloatingFlickable {
1692 id: floatingFlickable
1693 objectName: "spreadFlickable"
1694 anchors.fill: appContainer
1695 enabled: false
1696 contentWidth: spreadItem.spreadTotalWidth
1697
1698 function snap(toIndex) {
1699 var delegate = appRepeater.itemAt(toIndex)
1700 var targetContentX = floatingFlickable.contentWidth / spreadItem.totalItemCount * toIndex;
1701 if (targetContentX - floatingFlickable.contentX > spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) {
1702 var offset = (spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) - (targetContentX - floatingFlickable.contentX)
1703 snapAnimation.to = floatingFlickable.contentX - offset;
1704 snapAnimation.start();
1705 } else if (targetContentX - floatingFlickable.contentX < spreadItem.leftStackXPos + units.gu(1)) {
1706 var offset = (spreadItem.leftStackXPos + units.gu(1)) - (targetContentX - floatingFlickable.contentX);
1707 snapAnimation.to = floatingFlickable.contentX - offset;
1708 snapAnimation.start();
1709 }
1710 }
1711 UbuntuNumberAnimation {id: snapAnimation; target: floatingFlickable; property: "contentX"}
1712 }
1713
1714 PropertyAnimation {
1715 id: shortRightEdgeSwipeAnimation
1716 property: "x"
1717 to: 0
1718 duration: priv.animationDuration
1719 }
1720
806 SwipeArea {1721 SwipeArea {
1722 id: rightEdgeDragArea
1723 objectName: "rightEdgeDragArea"
807 direction: Direction.Leftwards1724 direction: Direction.Leftwards
808 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }1725 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
809 width: units.gu(1)1726 width: root.dragAreaWidth
810 onDraggingChanged: { if (dragging) { spread.show(); } }1727
1728 property var gesturePoints: []
1729 property bool cancelled: false
1730
1731 property real progress: dragging ? -touchPosition.x / root.width : 0
1732 onProgressChanged: {
1733 if (dragging) {
1734 draggedProgress = progress;
1735 }
1736 }
1737
1738 property real draggedProgress: 0
1739
1740 onTouchPositionChanged: {
1741 gesturePoints.push(touchPosition.x);
1742 if (gesturePoints.length > 10) {
1743 gesturePoints.splice(0, gesturePoints.length - 10)
1744 }
1745 }
1746
1747 onDraggingChanged: {
1748 if (dragging) {
1749 // A potential edge-drag gesture has started. Start recording it
1750 gesturePoints = [];
1751 cancelled = false;
1752 draggedProgress = 0;
1753 } else {
1754 // Ok. The user released. Did he drag far enough to go to full spread?
1755 if (gesturePoints[gesturePoints.length - 1] < -spreadItem.rightEdgeBreakPoint * spreadItem.width ) {
1756
1757 // He dragged far enough, but if the last movement was a flick to the right again, he wants to cancel the spread again.
1758 var oneWayFlickToRight = true;
1759 var smallestX = gesturePoints[0]-1;
1760 for (var i = 0; i < gesturePoints.length; i++) {
1761 if (gesturePoints[i] <= smallestX) {
1762 oneWayFlickToRight = false;
1763 break;
1764 }
1765 smallestX = gesturePoints[i];
1766 }
1767
1768 if (!oneWayFlickToRight) {
1769 // Ok, the user made it, let's go to spread!
1770 priv.goneToSpread = true;
1771 } else {
1772 cancelled = true;
1773 }
1774 } else {
1775 // Ok, the user didn't drag far enough to cross the breakPoint
1776 // Find out if it was a one-way movement to the left, in which case we just switch directly to next app.
1777 var oneWayFlick = true;
1778 var smallestX = rightEdgeDragArea.width;
1779 for (var i = 0; i < gesturePoints.length; i++) {
1780 if (gesturePoints[i] >= smallestX) {
1781 oneWayFlick = false;
1782 break;
1783 }
1784 smallestX = gesturePoints[i];
1785 }
1786
1787 if (appRepeater.count > 1 &&
1788 (oneWayFlick && rightEdgeDragArea.distance > units.gu(2) || rightEdgeDragArea.distance > spreadItem.rightEdgeBreakPoint * spreadItem.width)) {
1789 var nextStage = appRepeater.itemAt(priv.nextInStack).stage
1790 for (var i = 0; i < appRepeater.count; i++) {
1791 if (i != priv.nextInStack && appRepeater.itemAt(i).stage == nextStage) {
1792 appRepeater.itemAt(i).playHidingAnimation()
1793 break;
1794 }
1795 }
1796 appRepeater.itemAt(priv.nextInStack).playFocusAnimation()
1797 if (appRepeater.itemAt(priv.nextInStack).stage == ApplicationInfoInterface.SideStage && !sideStage.shown) {
1798 sideStage.show();
1799 }
1800
1801 } else {
1802 cancelled = true;
1803 }
1804
1805 gesturePoints = [];
1806 }
1807 }
1808 }
811 }1809 }
8121810
813 DesktopSpread {1811 TabletSideStageTouchGesture {
814 id: spread1812 id: triGestureArea
815 objectName: "spread"1813 objectName: "triGestureArea"
816 anchors.fill: appContainer1814 anchors.fill: parent
817 workspace: appContainer1815 enabled: false
818 focus: state == "altTab"1816 property Item appDelegate
819 altTabPressed: root.altTabPressed1817
8201818 dragComponent: dragComponent
821 onPlayFocusAnimation: {1819 dragComponentProperties: { "appDelegate": appDelegate }
822 appRepeater.itemAt(index).playFocusAnimation();1820
1821 onPressed: {
1822 function matchDelegate(obj) { return String(obj.objectName).indexOf("appDelegate") >= 0; }
1823
1824 var delegateAtCenter = Functions.itemAt(appContainer, x, y, matchDelegate);
1825 if (!delegateAtCenter) return;
1826
1827 appDelegate = delegateAtCenter;
1828 }
1829
1830 onClicked: {
1831 if (sideStage.shown) {
1832 sideStage.hide();
1833 } else {
1834 sideStage.show();
1835 priv.updateMainAndSideStageIndexes()
1836 }
1837 }
1838
1839 onDragStarted: {
1840 // If we're dragging to the sidestage.
1841 if (!sideStage.shown) {
1842 sideStage.show();
1843 }
1844 }
1845
1846 Component {
1847 id: dragComponent
1848 SurfaceContainer {
1849 property Item appDelegate
1850
1851 surface: appDelegate ? appDelegate.surface : null
1852
1853 consumesInput: false
1854 interactive: false
1855 focus: false
1856 requestedWidth: appDelegate.requestedWidth
1857 requestedHeight: appDelegate.requestedHeight
1858
1859 width: units.gu(40)
1860 height: units.gu(40)
1861
1862 Drag.hotSpot.x: width/2
1863 Drag.hotSpot.y: height/2
1864 // only accept opposite stage.
1865 Drag.keys: {
1866 if (!surface) return "Disabled";
1867 if (appDelegate.isDash) return "Disabled";
1868
1869 if (appDelegate.stage === ApplicationInfo.MainStage) {
1870 if (appDelegate.application.supportedOrientations
1871 & (Qt.PortraitOrientation|Qt.InvertedPortraitOrientation)) {
1872 return "MainStage";
1873 }
1874 return "Disabled";
1875 }
1876 return "SideStage";
1877 }
1878 }
823 }1879 }
824 }1880 }
825}1881}
8261882
=== added file 'qml/Stage/StageMaths.qml'
--- qml/Stage/StageMaths.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/StageMaths.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,79 @@
1import QtQuick 2.4
2import Unity.Application 0.1
3import Ubuntu.Components 1.3
4
5QtObject {
6 id: root
7
8 // input
9 property int itemIndex: 0
10 property int nextInStack: 0
11 property int sceneWidth: 0
12 property int sideStageWidth: 0
13 property int sideStageX: sceneWidth
14 property bool animateX: false
15 property int leftEdgeDragProgress: 0
16
17 property int stage: ApplicationInfoInterface.MainStage
18 property var thisDelegate: null
19 property var mainStageDelegate: null
20 property var sideStageDelegate: null
21
22 // output
23
24 // We need to shuffle z ordering a bit in order to keep side stage apps above main stage apps.
25 // We don't want to really reorder them in the model because that allows us to keep track
26 // of the last focused order.
27 readonly property int itemZ: {
28 // only shuffle when we've got a main and side stage
29 if (thisDelegate.isDash && thisDelegate != mainStageDelegate && leftEdgeDragProgress > 0) {
30 return -1; // Keep the dash behind all other apps for the left edge gesture
31 }
32
33 if (!sideStageDelegate) return itemIndex;
34
35 // don't shuffle indexes greater than "actives or next"
36 if (itemIndex > 2) return itemIndex;
37
38 if (thisDelegate == mainStageDelegate) {
39 // Active main stage always at 0
40 return 0;
41 }
42
43 if (nextInStack > 0) {
44 var stageOfNextInStack = appRepeater.itemAt(nextInStack).stage;
45
46 if (itemIndex === nextInStack) {
47 // this is the next app in stack.
48
49 if (stage === ApplicationInfoInterface.SideStage) {
50 // if the next app in stack is a sidestage app, it must order on top of other side stage app
51 return Math.min(2, topLevelSurfaceList.count-1);
52 }
53 return 1;
54 }
55 if (stageOfNextInStack === ApplicationInfoInterface.SideStage) {
56 // if the next app in stack is a sidestage app, it must order on top of other side stage app
57 return 1;
58 }
59 return Math.min(2, topLevelSurfaceList.count-1);
60 }
61 return Math.min(index+1, topLevelSurfaceList.count-1);
62 }
63
64
65 property int itemX: {
66 if (mainStageDelegate == thisDelegate) {
67 return thisDelegate.isDash ? 0 : leftEdgeDragProgress;
68 }
69 if (sideStageDelegate == thisDelegate) {
70 return sideStageX;
71 }
72 return thisDelegate.isDash && leftEdgeDragProgress > 0 ? 0 : sceneWidth;
73 }
74 Behavior on itemX { enabled: root.animateX; UbuntuNumberAnimation {} }
75
76 readonly property int itemWidth: stage == ApplicationInfoInterface.MainStage ?
77 sideStageDelegate != null ? sideStageX : sceneWidth :
78 stage == ApplicationInfoInterface.SideStage ? sideStageWidth : sceneWidth
79}
080
=== modified file 'qml/Stage/SurfaceContainer.qml'
--- qml/Stages/SurfaceContainer.qml 2016-05-18 21:58:39 +0000
+++ qml/Stage/SurfaceContainer.qml 2016-10-11 21:49:13 +0000
@@ -23,6 +23,8 @@
23FocusScope {23FocusScope {
24 id: root24 id: root
25 objectName: "surfaceContainer"25 objectName: "surfaceContainer"
26 implicitWidth: surfaceItem.implicitWidth
27 implicitHeight: surfaceItem.implicitHeight
2628
27 // Must be set from outside29 // Must be set from outside
28 property var surface: null30 property var surface: null
@@ -32,7 +34,6 @@
32 property int requestedHeight: -134 property int requestedHeight: -1
33 property bool interactive35 property bool interactive
34 property int surfaceOrientationAngle: 036 property int surfaceOrientationAngle: 0
35 property bool resizeSurface: true
36 property bool isPromptSurface: false37 property bool isPromptSurface: false
37 // FIME - dont export, use interactive property. Need to fix qtmir to handle consumesInputChanged38 // FIME - dont export, use interactive property. Need to fix qtmir to handle consumesInputChanged
38 // to update surface activeFocus. See mock MirSurfaceItem.39 // to update surface activeFocus. See mock MirSurfaceItem.
@@ -58,35 +59,15 @@
58 MirSurfaceItem {59 MirSurfaceItem {
59 id: surfaceItem60 id: surfaceItem
60 objectName: "surfaceItem"61 objectName: "surfaceItem"
62 anchors.fill: parent
6163
62 focus: true64 focus: true
6365
64 fillMode: MirSurfaceItem.PadOrCrop66 fillMode: MirSurfaceItem.PadOrCrop
65 consumesInput: true67 consumesInput: true
6668
67 surfaceWidth: {69 surfaceWidth: root.requestedWidth
68 if (root.resizeSurface) {70 surfaceHeight: root.requestedHeight
69 if (root.requestedWidth >= 0) {
70 return root.requestedWidth;
71 } else {
72 return width;
73 }
74 } else {
75 return -1;
76 }
77 }
78
79 surfaceHeight: {
80 if (root.resizeSurface) {
81 if (root.requestedHeight >= 0) {
82 return root.requestedHeight;
83 } else {
84 return height;
85 }
86 } else {
87 return -1;
88 }
89 }
9071
91 enabled: root.interactive72 enabled: root.interactive
92 antialiasing: !root.interactive73 antialiasing: !root.interactive
@@ -99,34 +80,6 @@
99 enabled: surfaceItem.enabled80 enabled: surfaceItem.enabled
100 }81 }
10182
102 // MirSurface size drives SurfaceContainer size
103 Binding {
104 target: surfaceItem; property: "width"; value: root.surface ? root.surface.size.width : 0
105 when: root.requestedWidth >= 0 && root.surface
106 }
107 Binding {
108 target: surfaceItem; property: "height"; value: root.surface ? root.surface.size.height : 0
109 when: root.requestedHeight >= 0 && root.surface
110 }
111 Binding {
112 target: root; property: "width"; value: surfaceItem.width
113 when: root.requestedWidth >= 0
114 }
115 Binding {
116 target: root; property: "height"; value: surfaceItem.height
117 when: root.requestedHeight >= 0
118 }
119
120 // SurfaceContainer size drives MirSurface size
121 Binding {
122 target: surfaceItem; property: "width"; value: root.width
123 when: root.requestedWidth < 0
124 }
125 Binding {
126 target: surfaceItem; property: "height"; value: root.height
127 when: root.requestedHeight < 0
128 }
129
130 Loader {83 Loader {
131 id: animationsLoader84 id: animationsLoader
132 objectName: "animationsLoader"85 objectName: "animationsLoader"
13386
=== modified file 'qml/Stage/TopLevelSurfaceRepeater.qml'
--- qml/Stages/TopLevelSurfaceRepeater.qml 2016-09-07 09:48:56 +0000
+++ qml/Stage/TopLevelSurfaceRepeater.qml 2016-10-11 21:49:13 +0000
@@ -55,4 +55,13 @@
55 startingUp = false;55 startingUp = false;
56 }56 }
57 }57 }
58
59 function indexOf(delegateItem) {
60 for (var i = 0; i < count; i++) {
61 if (itemAt(i) === delegateItem) {
62 return i;
63 }
64 }
65 return -1;
66 }
58}67}
5968
=== modified file 'qml/Stage/WindowDecoration.qml'
--- qml/Stages/WindowDecoration.qml 2016-09-22 07:42:18 +0000
+++ qml/Stage/WindowDecoration.qml 2016-10-11 21:49:13 +0000
@@ -79,7 +79,7 @@
79 onMaximizeClicked: root.maximizeClicked();79 onMaximizeClicked: root.maximizeClicked();
80 onMaximizeHorizontallyClicked: if (root.target.canBeMaximizedHorizontally) root.maximizeHorizontallyClicked();80 onMaximizeHorizontallyClicked: if (root.target.canBeMaximizedHorizontally) root.maximizeHorizontallyClicked();
81 onMaximizeVerticallyClicked: if (root.target.canBeMaximizedVertically) root.maximizeVerticallyClicked();81 onMaximizeVerticallyClicked: if (root.target.canBeMaximizedVertically) root.maximizeVerticallyClicked();
82 closeButtonShown: root.target.application.appId !== "unity8-dash"82 closeButtonShown: root.target.appId !== "unity8-dash"
83 }83 }
8484
85 Label {85 Label {
8686
=== added file 'qml/Stage/WindowInfoItem.qml'
--- qml/Stage/WindowInfoItem.qml 1970-01-01 00:00:00 +0000
+++ qml/Stage/WindowInfoItem.qml 2016-10-11 21:49:13 +0000
@@ -0,0 +1,53 @@
1import QtQuick 2.4
2import Ubuntu.Components 1.3
3
4Item {
5 id: root
6 implicitWidth: Math.max(iconShape.width, titleLabel.width)
7 implicitHeight: iconShape.height + titleLabel.height + labelMargin + iconMargin
8 property alias title: titleLabel.text
9 property alias iconSource: icon.source
10
11 property real iconHeight: (height - titleLabel.height) * 0.65
12 property real iconMargin: (height - titleLabel.height) * 0.25
13 property real labelMargin: (height - titleLabel.height) * 0.1
14 property int maxWidth: units.gu(10)
15
16 signal clicked()
17
18 ProportionalShape {
19 id: iconShape
20 anchors {
21 top: parent.top
22 topMargin: iconMargin
23 left: parent.left
24 }
25 height: iconHeight
26 borderSource: "undefined"
27 aspect: UbuntuShape.Flat
28 source: Image {
29 id: icon
30 sourceSize.width: iconShape.width
31 sourceSize.height: iconShape.height
32 cache: false // see lpbug#1543290 why no cache
33 }
34 }
35
36 MouseArea {
37 anchors.fill: iconShape
38 onClicked: root.clicked()
39 }
40
41 Label {
42 id: titleLabel
43 anchors {
44 left: iconShape.left
45 top: iconShape.bottom
46 topMargin: labelMargin
47 }
48 width: root.maxWidth
49 fontSize: 'small'
50 color: 'white'
51 elide: Label.ElideRight
52 }
53}
054
=== modified file 'qml/Stage/WindowResizeArea.qml'
--- qml/Stages/WindowResizeArea.qml 2016-08-31 13:00:26 +0000
+++ qml/Stage/WindowResizeArea.qml 2016-10-11 21:49:13 +0000
@@ -75,14 +75,15 @@
7575
76 function loadWindowState() {76 function loadWindowState() {
77 var windowGeometry = windowStateStorage.getGeometry(root.windowId,77 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
78 Qt.rect(target.requestedX, target.requestedY, defaultWidth, defaultHeight));78 Qt.rect(target.windowedX, target.windowedY, defaultWidth, defaultHeight));
7979
80 target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });80
81 target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),81 target.windowedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
82 target.windowedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
82 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });83 root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });
83 target.requestedX = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth),84 target.windowedX = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.windowedWidth),
84 (target.fullscreen ? 0 : root.leftMargin)); });85 (target.fullscreen ? 0 : root.leftMargin)); });
85 target.requestedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });86 target.windowedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.windowedHeight), PanelState.panelHeight); });
8687
87 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)88 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
88 target.restore(false /* animated */, windowState);89 target.restore(false /* animated */, windowState);
@@ -111,28 +112,28 @@
111112
112 readonly property int minimumWidth: root.target ? Math.max(root.minWidth, root.target.minimumWidth) : root.minWidth113 readonly property int minimumWidth: root.target ? Math.max(root.minWidth, root.target.minimumWidth) : root.minWidth
113 onMinimumWidthChanged: {114 onMinimumWidthChanged: {
114 if (target.requestedWidth < minimumWidth) {115 if (target.windowedWidth < minimumWidth) {
115 target.requestedWidth = minimumWidth;116 target.windowedWidth = minimumWidth;
116 }117 }
117 }118 }
118 readonly property int minimumHeight: root.target ? Math.max(root.minHeight, root.target.minimumHeight) : root.minHeight119 readonly property int minimumHeight: root.target ? Math.max(root.minHeight, root.target.minimumHeight) : root.minHeight
119 onMinimumHeightChanged: {120 onMinimumHeightChanged: {
120 if (target.requestedHeight < minimumHeight) {121 if (target.windowedHeight < minimumHeight) {
121 target.requestedHeight = minimumHeight;122 target.windowedHeight = minimumHeight;
122 }123 }
123 }124 }
124 readonly property int maximumWidth: root.target && root.target.maximumWidth >= minimumWidth && root.target.maximumWidth > 0125 readonly property int maximumWidth: root.target && root.target.maximumWidth >= minimumWidth && root.target.maximumWidth > 0
125 ? root.target.maximumWidth : maxSafeInt126 ? root.target.maximumWidth : maxSafeInt
126 onMaximumWidthChanged: {127 onMaximumWidthChanged: {
127 if (target.requestedWidth > maximumWidth) {128 if (target.windowedWidth > maximumWidth) {
128 target.requestedWidth = maximumWidth;129 target.windowedWidth = maximumWidth;
129 }130 }
130 }131 }
131 readonly property int maximumHeight: root.target && root.target.maximumHeight >= minimumHeight && root.target.maximumHeight > 0132 readonly property int maximumHeight: root.target && root.target.maximumHeight >= minimumHeight && root.target.maximumHeight > 0
132 ? root.target.maximumHeight : maxSafeInt133 ? root.target.maximumHeight : maxSafeInt
133 onMaximumHeightChanged: {134 onMaximumHeightChanged: {
134 if (target.requestedHeight > maximumHeight) {135 if (target.windowedHeight > maximumHeight) {
135 target.requestedHeight = maximumHeight;136 target.windowedHeight = maximumHeight;
136 }137 }
137 }138 }
138 readonly property int widthIncrement: {139 readonly property int widthIncrement: {
@@ -247,8 +248,8 @@
247 var pos = mapToItem(root.target.parent, mouseX, mouseY);248 var pos = mapToItem(root.target.parent, mouseX, mouseY);
248 d.startMousePosX = pos.x;249 d.startMousePosX = pos.x;
249 d.startMousePosY = pos.y;250 d.startMousePosY = pos.y;
250 d.startX = target.requestedX;251 d.startX = target.windowedX;
251 d.startY = target.requestedY;252 d.startY = target.windowedY;
252 d.startWidth = target.width;253 d.startWidth = target.width;
253 d.startHeight = target.height;254 d.startHeight = target.height;
254 d.currentWidth = target.width;255 d.currentWidth = target.width;
@@ -285,53 +286,53 @@
285286
286 if (d.leftBorder) {287 if (d.leftBorder) {
287 var newTargetX = d.startX + deltaX;288 var newTargetX = d.startX + deltaX;
288 var rightBorderX = target.requestedX + target.width;289 var rightBorderX = target.windowedX + target.width;
289 if (rightBorderX > newTargetX + d.minimumWidth) {290 if (rightBorderX > newTargetX + d.minimumWidth) {
290 if (rightBorderX < newTargetX + d.maximumWidth) {291 if (rightBorderX < newTargetX + d.maximumWidth) {
291 target.requestedWidth = rightBorderX - newTargetX;292 target.windowedWidth = rightBorderX - newTargetX;
292 } else {293 } else {
293 target.requestedWidth = d.maximumWidth;294 target.windowedWidth = d.maximumWidth;
294 }295 }
295 } else {296 } else {
296 target.requestedWidth = d.minimumWidth;297 target.windowedWidth = d.minimumWidth;
297 }298 }
298299
299 } else if (d.rightBorder) {300 } else if (d.rightBorder) {
300 var newWidth = d.startWidth + deltaX;301 var newWidth = d.startWidth + deltaX;
301 if (newWidth > d.minimumWidth) {302 if (newWidth > d.minimumWidth) {
302 if (newWidth < d.maximumWidth) {303 if (newWidth < d.maximumWidth) {
303 target.requestedWidth = newWidth;304 target.windowedWidth = newWidth;
304 } else {305 } else {
305 target.requestedWidth = d.maximumWidth;306 target.windowedWidth = d.maximumWidth;
306 }307 }
307 } else {308 } else {
308 target.requestedWidth = d.minimumWidth;309 target.windowedWidth = d.minimumWidth;
309 }310 }
310 }311 }
311312
312 if (d.topBorder) {313 if (d.topBorder) {
313 var newTargetY = Math.max(d.startY + deltaY, PanelState.panelHeight); // disallow resizing up past Panel314 var newTargetY = Math.max(d.startY + deltaY, PanelState.panelHeight); // disallow resizing up past Panel
314 var bottomBorderY = target.requestedY + target.height;315 var bottomBorderY = target.windowedY + target.height;
315 if (bottomBorderY > newTargetY + d.minimumHeight) {316 if (bottomBorderY > newTargetY + d.minimumHeight) {
316 if (bottomBorderY < newTargetY + d.maximumHeight) {317 if (bottomBorderY < newTargetY + d.maximumHeight) {
317 target.requestedHeight = bottomBorderY - newTargetY;318 target.windowedHeight = bottomBorderY - newTargetY;
318 } else {319 } else {
319 target.requestedHeight = d.maximumHeight;320 target.windowedHeight = d.maximumHeight;
320 }321 }
321 } else {322 } else {
322 target.requestedHeight = d.minimumHeight;323 target.windowedHeight = d.minimumHeight;
323 }324 }
324325
325 } else if (d.bottomBorder) {326 } else if (d.bottomBorder) {
326 var newHeight = d.startHeight + deltaY;327 var newHeight = d.startHeight + deltaY;
327 if (newHeight > d.minimumHeight) {328 if (newHeight > d.minimumHeight) {
328 if (newHeight < d.maximumHeight) {329 if (newHeight < d.maximumHeight) {
329 target.requestedHeight = newHeight;330 target.windowedHeight = newHeight;
330 } else {331 } else {
331 target.requestedHeight = d.maximumHeight;332 target.windowedHeight = d.maximumHeight;
332 }333 }
333 } else {334 } else {
334 target.requestedHeight = d.minimumHeight;335 target.windowedHeight = d.minimumHeight;
335 }336 }
336 }337 }
337 }338 }
@@ -340,13 +341,13 @@
340 target: root.target341 target: root.target
341 onWidthChanged: {342 onWidthChanged: {
342 if (d.moveLeftBorder) {343 if (d.moveLeftBorder) {
343 target.requestedX += d.currentWidth - target.width;344 target.windowedX += d.currentWidth - target.width;
344 }345 }
345 d.currentWidth = target.width;346 d.currentWidth = target.width;
346 }347 }
347 onHeightChanged: {348 onHeightChanged: {
348 if (d.moveTopBorder) {349 if (d.moveTopBorder) {
349 target.requestedY += d.currentHeight - target.height;350 target.windowedY += d.currentHeight - target.height;
350 }351 }
351 d.currentHeight = target.height;352 d.currentHeight = target.height;
352 }353 }
353354
=== removed file 'qml/Stages/AbstractStage.qml'
--- qml/Stages/AbstractStage.qml 2016-09-07 08:36:59 +0000
+++ qml/Stages/AbstractStage.qml 1970-01-01 00:00:00 +0000
@@ -1,93 +0,0 @@
1/*
2 * Copyright (C) 2015-2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import GlobalShortcut 1.0
20import GSettings 1.0
21
22FocusScope {
23 id: root
24
25 // Controls to be set from outside
26 property QtObject applicationManager
27 property QtObject topLevelSurfaceList
28 property bool altTabPressed
29 property url background
30 property bool beingResized
31 property int dragAreaWidth
32 property real dragProgress // How far left the stage has been dragged, used externally by tutorial code
33 property bool interactive
34 property real inverseProgress // This is the progress for left edge drags, in pixels.
35 property bool keepDashRunning: true
36 property real maximizedAppTopMargin
37 property real nativeHeight
38 property real nativeWidth
39 property QtObject orientations
40 property int shellOrientation
41 property int shellOrientationAngle
42 property bool spreadEnabled: true // If false, animations and right edge will be disabled
43 property bool suspended
44 // A Stage should paint a wallpaper etc over its full size but not use the margins for window placement
45 property int leftMargin: 0
46 property alias paintBackground: background.visible
47 property bool oskEnabled: false
48
49 // To be read from outside
50 property var mainApp: null
51 property int mainAppWindowOrientationAngle: 0
52 property bool orientationChangesEnabled
53 property int supportedOrientations: Qt.PortraitOrientation
54 | Qt.LandscapeOrientation
55 | Qt.InvertedPortraitOrientation
56 | Qt.InvertedLandscapeOrientation
57
58 property Item itemConfiningMouseCursor: null
59
60
61 signal stageAboutToBeUnloaded
62 signal itemSnapshotRequested(Item item)
63
64 // Shared code for use in stage implementations
65 GSettings {
66 id: lifecycleExceptions
67 schema.id: "com.canonical.qtmir"
68 }
69
70 function isExemptFromLifecycle(appId) {
71 var shortAppId = appId.split('_')[0];
72 for (var i = 0; i < lifecycleExceptions.lifecycleExemptAppids.length; i++) {
73 if (shortAppId === lifecycleExceptions.lifecycleExemptAppids[i]) {
74 return true;
75 }
76 }
77 return false;
78 }
79
80 Rectangle {
81 id: background
82 color: "#060606"
83 anchors.fill: parent
84 }
85
86 // shared Alt+F4 functionality
87 function closeFocusedDelegate() {} // to be implemented by stages
88
89 GlobalShortcut {
90 shortcut: Qt.AltModifier|Qt.Key_F4
91 onTriggered: closeFocusedDelegate()
92 }
93}
940
=== removed file 'qml/Stages/DesktopSpread.qml'
--- qml/Stages/DesktopSpread.qml 2016-06-15 14:08:18 +0000
+++ qml/Stages/DesktopSpread.qml 1970-01-01 00:00:00 +0000
@@ -1,576 +0,0 @@
1/*
2 * Copyright (C) 2015-2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import QtQuick.Layouts 1.1
19import Ubuntu.Components 1.3
20import Ubuntu.Gestures 0.1
21import Unity.Application 0.1
22import "../Components"
23import Utils 0.1
24
25FocusScope {
26 id: root
27
28 property bool altTabPressed: false
29 property Item workspace: null
30
31 readonly property alias ready: blurLayer.ready
32 readonly property alias highlightedIndex: spreadRepeater.highlightedIndex
33
34 signal playFocusAnimation(int index)
35
36 function show() {
37 spreadContainer.animateIn = true;
38 root.state = "altTab";
39 }
40
41 onFocusChanged: {
42 // When the spread comes active, we want to keep focus to the input handler below
43 // Make sure nothing inside the ApplicationWindow grabs our focus!
44 if (focus) {
45 forceActiveFocus();
46 }
47 }
48
49 Keys.onPressed: {
50 switch (event.key) {
51 case Qt.Key_Left:
52 case Qt.Key_Backtab:
53 selectPrevious(event.isAutoRepeat)
54 event.accepted = true;
55 break;
56 case Qt.Key_Right:
57 case Qt.Key_Tab:
58 selectNext(event.isAutoRepeat)
59 event.accepted = true;
60 break;
61 case Qt.Key_Escape:
62 spreadRepeater.highlightedIndex = -1
63 // Falling through intentionally
64 case Qt.Key_Enter:
65 case Qt.Key_Return:
66 case Qt.Key_Space:
67 root.state = ""
68 event.accepted = true;
69 }
70 }
71
72 function selectNext(isAutoRepeat) {
73 if (isAutoRepeat && spreadRepeater.highlightedIndex >= topLevelSurfaceList.count -1) {
74 return; // AutoRepeat is not allowed to wrap around
75 }
76
77 spreadRepeater.highlightedIndex = (spreadRepeater.highlightedIndex + 1) % topLevelSurfaceList.count;
78 var newContentX = ((spreadFlickable.contentWidth) / (topLevelSurfaceList.count + 1)) * Math.max(0, Math.min(topLevelSurfaceList.count - 5, spreadRepeater.highlightedIndex - 3));
79 if (spreadFlickable.contentX < newContentX || spreadRepeater.highlightedIndex == 0) {
80 spreadFlickable.snapTo(newContentX)
81 }
82 }
83
84 function selectPrevious(isAutoRepeat) {
85 if (isAutoRepeat && spreadRepeater.highlightedIndex == 0) {
86 return; // AutoRepeat is not allowed to wrap around
87 }
88
89 var newIndex = spreadRepeater.highlightedIndex - 1 >= 0 ? spreadRepeater.highlightedIndex - 1 : topLevelSurfaceList.count - 1;
90 spreadRepeater.highlightedIndex = newIndex;
91 var newContentX = ((spreadFlickable.contentWidth) / (topLevelSurfaceList.count + 1)) * Math.max(0, Math.min(topLevelSurfaceList.count - 5, spreadRepeater.highlightedIndex - 1));
92 if (spreadFlickable.contentX > newContentX || newIndex == topLevelSurfaceList.count -1) {
93 spreadFlickable.snapTo(newContentX)
94 }
95 }
96
97 function focusSelected() {
98 if (spreadRepeater.highlightedIndex != -1) {
99 if (spreadContainer.visible) {
100 root.playFocusAnimation(spreadRepeater.highlightedIndex)
101 }
102 var surface = topLevelSurfaceList.surfaceAt(spreadRepeater.highlightedIndex);
103 surface.requestFocus();
104 }
105 }
106
107 function cancel() {
108 spreadRepeater.highlightedIndex = -1;
109 state = ""
110 }
111
112 BlurLayer {
113 id: blurLayer
114 anchors.fill: parent
115 source: root.workspace
116 visible: false
117 }
118
119 Rectangle {
120 id: spreadBackground
121 anchors.fill: parent
122 color: "#B2000000"
123 visible: false
124 opacity: visible ? 1 : 0
125 Behavior on opacity {
126 UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
127 }
128 }
129
130 MouseArea {
131 id: eventEater
132 anchors.fill: parent
133 visible: spreadBackground.visible
134 enabled: visible
135 acceptedButtons: Qt.AllButtons
136 onWheel: wheel.accepted = true;
137 }
138
139 Item {
140 id: spreadContainer
141 objectName: "spreadContainer"
142 anchors.fill: parent
143 visible: false
144
145 property bool animateIn: false
146
147 Repeater {
148 id: spreadRepeater
149 objectName: "spreadRepeater"
150 model: topLevelSurfaceList
151
152 property int highlightedIndex: -1
153 property int closingIndex: -1
154
155 function indexOf(delegateItem) {
156 for (var i = 0; i < spreadRepeater.count; i++) {
157 if (spreadRepeater.itemAt(i) === delegateItem) {
158 return i;
159 }
160 }
161 return -1;
162 }
163
164 delegate: Item {
165 id: spreadDelegate
166 objectName: "spreadDelegate"
167 width: units.gu(20)
168 height: units.gu(20)
169
170 property real angle: 0
171 property real itemScale: 1
172 property int itemScaleOriginX: 0
173 property int itemScaleOriginY: 0
174
175 readonly property string windowTitle: clippedSpreadDelegate.window.title
176
177 Behavior on x {
178 id: closeBehavior
179 enabled: spreadRepeater.closingIndex >= 0
180 UbuntuNumberAnimation {
181 onRunningChanged: if (!running) spreadRepeater.closingIndex = -1
182 }
183 }
184
185 DesktopSpreadDelegate {
186 id: clippedSpreadDelegate
187 objectName: "clippedSpreadDelegate"
188 anchors.left: parent.left
189 anchors.top: parent.top
190 application: model.application
191 surface: model.surface
192 width: spreadMaths.spreadHeight
193 height: spreadMaths.spreadHeight
194
195 transform: [
196 Scale {
197 origin.x: itemScaleOriginX
198 origin.y: itemScaleOriginY
199 xScale: itemScale
200 yScale: itemScale
201 },
202 Rotation {
203 origin { x: 0; y: (clippedSpreadDelegate.height - (clippedSpreadDelegate.height * itemScale / 2)) }
204 axis { x: 0; y: 1; z: 0 }
205 angle: spreadDelegate.angle
206 }
207 ]
208
209 MouseArea {
210 id: spreadSelectArea
211 anchors.fill: parent
212 anchors.margins: -units.gu(2)
213 enabled: false
214 onClicked: {
215 spreadRepeater.highlightedIndex = index;
216 root.state = "";
217 }
218 }
219 }
220
221 SpreadMaths {
222 id: spreadMaths
223 flickable: spreadFlickable
224 itemIndex: index
225 totalItems: Math.max(6, topLevelSurfaceList.count)
226 sceneHeight: root.height
227 itemHeight: spreadDelegate.height
228 }
229
230 states: [
231 State {
232 name: "altTab"; when: root.state == "altTab" && spreadContainer.visible
233 PropertyChanges {
234 target: spreadDelegate
235 x: spreadMaths.animatedX
236 y: spreadMaths.animatedY + (spreadDelegate.height - clippedSpreadDelegate.height) - units.gu(2)
237 width: spreadMaths.spreadHeight
238 height: spreadMaths.sceneHeight
239 angle: spreadMaths.animatedAngle
240 itemScale: spreadMaths.scale
241 itemScaleOriginY: clippedSpreadDelegate.height / 2;
242 z: index
243 visible: spreadMaths.itemVisible
244 }
245 PropertyChanges {
246 target: clippedSpreadDelegate
247 highlightShown: index == spreadRepeater.highlightedIndex
248 state: "transformed"
249 shadowOpacity: spreadMaths.shadowOpacity
250 anchors.topMargin: units.gu(2)
251 }
252 PropertyChanges {
253 target: tileInfo
254 visible: true
255 opacity: spreadMaths.tileInfoOpacity
256 }
257 PropertyChanges {
258 target: spreadSelectArea
259 enabled: true
260 }
261 }
262 ]
263 transitions: [
264 Transition {
265 from: ""
266 to: "altTab"
267 SequentialAnimation {
268 ParallelAnimation {
269 PropertyAction { target: spreadDelegate; properties: "y,height,width,angle,z,itemScale,itemScaleOriginY,visible" }
270 PropertyAction { target: clippedSpreadDelegate; properties: "anchors.topMargin" }
271 PropertyAnimation {
272 target: spreadDelegate; properties: "x"
273 from: root.width
274 duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration :0
275 easing: UbuntuAnimation.StandardEasing
276 }
277 UbuntuNumberAnimation { target: clippedSpreadDelegate; property: "shadowOpacity"; from: 0; to: spreadMaths.shadowOpacity; duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration : 0 }
278 UbuntuNumberAnimation { target: tileInfo; property: "opacity"; from: 0; to: spreadMaths.tileInfoOpacity; duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration : 0 }
279 }
280 PropertyAction { target: spreadSelectArea; property: "enabled" }
281 }
282 }
283 ]
284
285 MouseArea {
286 id: tileInfo
287 objectName: "tileInfo"
288 anchors {
289 left: parent.left
290 top: clippedSpreadDelegate.bottom
291 topMargin: ((spreadMaths.sceneHeight - spreadDelegate.y) - clippedSpreadDelegate.height) * 0.2
292 }
293 property int nextItemX: spreadRepeater.count > index + 1 ? spreadRepeater.itemAt(index + 1).x : spreadDelegate.x + units.gu(30)
294 width: Math.min(units.gu(30), nextItemX - spreadDelegate.x)
295 height: titleInfoColumn.height
296 visible: false
297 hoverEnabled: true
298
299 onContainsMouseChanged: {
300 if (containsMouse) {
301 spreadRepeater.highlightedIndex = index
302 }
303 }
304
305 onClicked: {
306 root.state = ""
307 }
308
309 ColumnLayout {
310 id: titleInfoColumn
311 anchors { left: parent.left; top: parent.top; right: parent.right }
312 spacing: units.gu(1)
313
314 UbuntuShapeForItem {
315 Layout.preferredHeight: Math.min(units.gu(6), root.height * .05)
316 Layout.preferredWidth: height * 8 / 7.6
317 image: Image {
318 anchors.fill: parent
319 source: model.application.icon
320 Rectangle {
321 anchors.fill: parent
322 color: "black"
323 opacity: clippedSpreadDelegate.highlightShown ? 0 : .1
324 Behavior on opacity {
325 UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
326 }
327 }
328 }
329 }
330 Label {
331 Layout.fillWidth: true
332 Layout.preferredHeight: units.gu(6)
333 text: model.application ? model.application.name : spreadDelegate.windowTitle
334 wrapMode: Text.WordWrap
335 elide: Text.ElideRight
336 maximumLineCount: 2
337 }
338 }
339 }
340
341 Image {
342 id: closeImage
343 anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 + spreadMaths.closeIconOffset + units.gu(2) }
344 source: "graphics/window-close.svg"
345 readonly property var mousePos: hoverMouseArea.mapToItem(spreadDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
346 visible: index == spreadRepeater.highlightedIndex
347 && mousePos.y < (clippedSpreadDelegate.height / 3)
348 && mousePos.y > -units.gu(4)
349 && mousePos.x > -units.gu(4)
350 && mousePos.x < (clippedSpreadDelegate.width * 2 / 3)
351 height: units.gu(1.5)
352 width: height
353 sourceSize.width: width
354 sourceSize.height: height
355
356 MouseArea {
357 id: closeMouseArea
358 objectName: "closeMouseArea"
359 anchors.fill: closeImage
360 anchors.margins: -units.gu(2)
361 onClicked: {
362 spreadRepeater.closingIndex = index;
363 model.surface.close();
364 }
365 }
366 }
367 }
368 }
369 }
370
371
372 MouseArea {
373 id: hoverMouseArea
374 objectName: "hoverMouseArea"
375 anchors.fill: spreadContainer
376 propagateComposedEvents: true
377 hoverEnabled: true
378 enabled: false
379 visible: enabled
380
381 property int scrollAreaWidth: root.width / 3
382 property bool progressiveScrollingEnabled: false
383
384 onMouseXChanged: {
385 mouse.accepted = false
386
387 if (hoverMouseArea.pressed) {
388 return;
389 }
390
391 // Find the hovered item and mark it active
392 var mapped = mapToItem(spreadContainer, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
393 var itemUnder = spreadContainer.childAt(mapped.x, mapped.y)
394 if (itemUnder) {
395 mapped = mapToItem(itemUnder, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
396 var delegateChild = itemUnder.childAt(mapped.x, mapped.y)
397 if (delegateChild && (delegateChild.objectName === "clippedSpreadDelegate" || delegateChild.objectName === "tileInfo")) {
398 spreadRepeater.highlightedIndex = spreadRepeater.indexOf(itemUnder)
399 }
400 }
401
402 if (spreadFlickable.contentWidth > spreadFlickable.minContentWidth) {
403 var margins = spreadFlickable.width * 0.05;
404
405 if (!progressiveScrollingEnabled && mouseX < spreadFlickable.width - scrollAreaWidth) {
406 progressiveScrollingEnabled = true
407 }
408
409 // do we need to scroll?
410 if (mouseX < scrollAreaWidth + margins) {
411 var progress = Math.min(1, (scrollAreaWidth + margins - mouseX) / (scrollAreaWidth - margins));
412 var contentX = (1 - progress) * (spreadFlickable.contentWidth - spreadFlickable.width)
413 spreadFlickable.contentX = Math.max(0, Math.min(spreadFlickable.contentX, contentX))
414 }
415 if (mouseX > spreadFlickable.width - scrollAreaWidth && progressiveScrollingEnabled) {
416 var progress = Math.min(1, (mouseX - (spreadFlickable.width - scrollAreaWidth)) / (scrollAreaWidth - margins))
417 var contentX = progress * (spreadFlickable.contentWidth - spreadFlickable.width)
418 spreadFlickable.contentX = Math.min(spreadFlickable.contentWidth - spreadFlickable.width, Math.max(spreadFlickable.contentX, contentX))
419 }
420 }
421 }
422 onPressed: mouse.accepted = false
423 }
424
425 FloatingFlickable {
426 id: spreadFlickable
427 objectName: "spreadFlickable"
428 anchors.fill: parent
429 property int minContentWidth: 6 * Math.min(height / 4, width / 5)
430 contentWidth: Math.max(6, topLevelSurfaceList.count) * Math.min(height / 4, width / 5)
431 enabled: false
432
433 function snapTo(contentX) {
434 snapAnimation.stop();
435 snapAnimation.to = contentX
436 snapAnimation.start();
437 }
438
439 UbuntuNumberAnimation {
440 id: snapAnimation
441 target: spreadFlickable
442 property: "contentX"
443 }
444 }
445
446 Item {
447 id: workspaceSelector
448 anchors {
449 left: parent.left
450 top: parent.top
451 right: parent.right
452 topMargin: units.gu(3.5)
453 }
454 height: root.height * 0.25
455 visible: false
456
457 RowLayout {
458 anchors.fill: parent
459 spacing: units.gu(1)
460 Item { Layout.fillWidth: true }
461 Repeater {
462 model: 1 // TODO: will be a workspacemodel in the future
463 Item {
464 Layout.fillHeight: true
465 Layout.preferredWidth: ((height - units.gu(6)) * root.width / root.height)
466 Image {
467 source: root.background
468 anchors {
469 left: parent.left
470 right: parent.right
471 verticalCenter: parent.verticalCenter
472 }
473 height: parent.height * 0.75
474
475 ShaderEffect {
476 anchors.fill: parent
477
478 property var source: ShaderEffectSource {
479 id: shaderEffectSource
480 sourceItem: root.workspace
481 }
482
483 fragmentShader: "
484 varying highp vec2 qt_TexCoord0;
485 uniform sampler2D source;
486 void main(void)
487 {
488 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
489 gl_FragColor = sourceColor;
490 }"
491 }
492 }
493
494 // TODO: This is the bar for the currently selected workspace
495 // Enable this once the workspace stuff is implemented
496 // Rectangle {
497 // anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
498 // height: units.dp(2)
499 // color: theme.palette.normal.focus
500 // visible: index == 0 // TODO: should be active workspace index
501 // }
502 }
503
504 }
505 // TODO: This is the "new workspace" button. Enable this once workspaces are implemented
506 // Item {
507 // Layout.fillHeight: true
508 // Layout.preferredWidth: ((height - units.gu(6)) * root.width / root.height)
509 // Rectangle {
510 // anchors {
511 // left: parent.left
512 // right: parent.right
513 // verticalCenter: parent.verticalCenter
514 // }
515 // height: parent.height * 0.75
516 // color: "#22ffffff"
517
518 // Label {
519 // anchors.centerIn: parent
520 // font.pixelSize: parent.height / 2
521 // text: "+"
522 // }
523 // }
524 // }
525 Item { Layout.fillWidth: true }
526 }
527 }
528
529 Label {
530 id: currentSelectedLabel
531 anchors { bottom: parent.bottom; bottomMargin: root.height * 0.625; horizontalCenter: parent.horizontalCenter }
532 text: spreadRepeater.highlightedIndex >= 0 ? spreadRepeater.itemAt(spreadRepeater.highlightedIndex).windowTitle: ""
533 visible: false
534 fontSize: "large"
535 }
536
537 states: [
538 State {
539 name: "altTab"; when: root.altTabPressed
540 PropertyChanges { target: blurLayer; saturation: 0.8; blurRadius: 60; visible: true }
541 PropertyChanges { target: workspaceSelector; visible: true }
542 PropertyChanges { target: spreadContainer; visible: true }
543 PropertyChanges { target: spreadFlickable; enabled: spreadFlickable.contentWidth > spreadFlickable.minContentWidth }
544 PropertyChanges { target: currentSelectedLabel; visible: true }
545 PropertyChanges { target: spreadBackground; visible: true }
546 PropertyChanges { target: hoverMouseArea; enabled: true }
547 }
548 ]
549 transitions: [
550 Transition {
551 from: "*"
552 to: "altTab"
553 SequentialAnimation {
554 PropertyAction { target: spreadRepeater; property: "highlightedIndex"; value: Math.min(topLevelSurfaceList.count - 1, 1) }
555 PauseAnimation { duration: spreadContainer.animateIn ? 0 : 140 }
556 PropertyAction { target: workspaceSelector; property: "visible" }
557 PropertyAction { target: spreadContainer; property: "visible" }
558 ParallelAnimation {
559 UbuntuNumberAnimation { target: blurLayer; properties: "saturation,blurRadius"; duration: UbuntuAnimation.SnapDuration }
560 PropertyAction { target: spreadFlickable; property: "visible" }
561 PropertyAction { targets: [currentSelectedLabel,spreadBackground]; property: "visible" }
562 PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
563 }
564 PropertyAction { target: hoverMouseArea; properties: "enabled,progressiveScrollingEnabled"; value: false }
565 }
566 },
567 Transition {
568 from: "*"
569 to: "*"
570 PropertyAnimation { property: "opacity" }
571 ScriptAction { script: { root.focusSelected() } }
572 PropertyAction { target: spreadRepeater; property: "highlightedIndex"; value: -1 }
573 PropertyAction { target: spreadContainer; property: "animateIn"; value: false }
574 }
575 ]
576}
5770
=== removed file 'qml/Stages/DesktopSpreadDelegate.qml'
--- qml/Stages/DesktopSpreadDelegate.qml 2016-05-17 20:46:51 +0000
+++ qml/Stages/DesktopSpreadDelegate.qml 1970-01-01 00:00:00 +0000
@@ -1,126 +0,0 @@
1/*
2 * Copyright (C) 2014-2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
18
19import QtQuick 2.4
20import Ubuntu.Components 1.3
21import Unity.Application 0.1
22
23Item {
24 id: root
25
26 property alias window: applicationWindow
27 property alias application: applicationWindow.application
28 property alias surface: applicationWindow.surface
29
30 property bool highlightShown: false
31 property real shadowOpacity: 1
32
33 property int windowWidth: surface ? surface.size.width : 0
34 property int windowHeight: surface ? surface.size.height : 0
35
36 state: "normal"
37 states: [
38 State {
39 name: "normal"
40 PropertyChanges {
41 target: root
42 width: windowWidth
43 height: windowHeight
44 }
45 },
46 State {
47 name: "transformed"
48 PropertyChanges {
49 target: applicationWindow
50 itemScale: Math.max(root.width / root.windowWidth, root.height / root.windowHeight)
51 interactive: false
52 }
53 PropertyChanges {
54 target: clipper
55 clip: true
56 }
57 }
58 ]
59
60 scale: highlightShown ? 1.025 : 1
61 Behavior on scale {
62 UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
63 }
64
65 BorderImage {
66 anchors {
67 fill: root
68 margins: -units.gu(2)
69 }
70 source: "graphics/dropshadow2gu.sci"
71 opacity: root.shadowOpacity * .3
72 }
73
74 Rectangle {
75 id: selectionHighlight
76 anchors.fill: parent
77 anchors.margins: -units.gu(1)
78 color: "white"
79 opacity: highlightShown ? 0.55 : 0
80 antialiasing: true
81 }
82
83 Rectangle {
84 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
85 height: units.dp(2)
86 color: theme.palette.normal.focus
87 visible: root.highlightShown
88 antialiasing: true
89 }
90
91 Item {
92 id: clipper
93 anchors.fill: parent
94
95 ApplicationWindow {
96 id: applicationWindow
97 objectName: application ? "appWindow_" + application.appId : "appWindow_null"
98 anchors.top: parent.top
99 anchors.topMargin: 0
100 anchors.left: parent.left
101 width: root.windowWidth
102 height: root.windowHeight
103 interactive: false
104 resizeSurface: false
105 focus: false
106
107 property real itemScale: 1
108 transform: [
109 Scale {
110 origin.x: 0; origin.y: 0
111 xScale: applicationWindow.itemScale
112 yScale: applicationWindow.itemScale
113 }
114 ]
115 }
116 }
117
118 Rectangle {
119 anchors.fill: parent
120 color: "black"
121 opacity: root.highlightShown ? 0 : .1
122 Behavior on opacity {
123 UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
124 }
125 }
126}
1270
=== removed file 'qml/Stages/PhoneStage.qml'
--- qml/Stages/PhoneStage.qml 2016-08-08 11:18:19 +0000
+++ qml/Stages/PhoneStage.qml 1970-01-01 00:00:00 +0000
@@ -1,806 +0,0 @@
1/*
2 * Copyright (C) 2014-2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
20import Unity.Application 0.1
21import Unity.Session 0.1
22import Utils 0.1
23import Powerd 0.1
24import "../Components"
25
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches