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

Proposed by Lukáš Tinkl
Status: Superseded
Proposed branch: lp:~lukas-kde/unity8/windowOpenCloseAnimations
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/launcher-sizing
Diff against target: 558 lines (+209/-75)
10 files modified
plugins/Unity/Indicators/indicatorsmanager.cpp (+3/-5)
qml/Panel/Indicators/MenuItemFactory.qml (+46/-0)
qml/Stages/ApplicationWindow.qml (+5/-8)
qml/Stages/DecoratedWindow.qml (+3/-6)
qml/Stages/DesktopStage.qml (+135/-22)
qml/Stages/SurfaceContainer.qml (+7/-26)
qml/Stages/WindowResizeArea.qml (+5/-5)
tests/qmltests/Stages/tst_DesktopStage.qml (+3/-3)
tests/qmltests/Stages/tst_WindowResizeArea.qml (+1/-0)
tests/qmltests/tst_Shell.qml (+1/-0)
To merge this branch: bzr merge lp:~lukas-kde/unity8/windowOpenCloseAnimations
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Daniel d'Andrada (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Terry Pending
Nick Dedekind Pending
Review via email: mp+284775@code.launchpad.net

This proposal supersedes a proposal from 2016-01-08.

This proposal has been superseded by a proposal from 2016-02-17.

Commit message

Provide animations for windows opening/closing

Description of the change

Provide animations for windows opening/closing, as described by UX in the original bugreport.

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

Yes, lp:~mzanetti/unity8/launcher-sizing

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

Yes

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

Yes

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

Yes

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

Yes

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

FAILED: Continuous integration, rev:2112
http://jenkins.qa.ubuntu.com/job/unity8-ci/7041/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5984
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/456/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1746
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/449
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1641
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1641
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/448
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/447
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4623
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5995
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5995/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26543
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/204/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/454
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/454/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26544

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

- The app closing animation seems to "stick" on the last frame. Or not smoothly go down to zero opacity. Or something. It didn't look right on my mako.

- closeApplication() takes two arguments, normally only using the first one. It uses the appId if the first argument is not given, which is an odd construction. Maybe just drop the second argument completely, as it's never used?

Otherwise already looks nice. :)

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

> - The app closing animation seems to "stick" on the last frame. Or not
> smoothly go down to zero opacity. Or something. It didn't look right on my
> mako.

Agree, using the standard UbuntuNumberAnimation feels much smoother, at least here

> - closeApplication() takes two arguments, normally only using the first one.
> It uses the appId if the first argument is not given, which is an odd
> construction. Maybe just drop the second argument completely, as it's never
> used?

Fixed

> Otherwise already looks nice. :)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2114
http://jenkins.qa.ubuntu.com/job/unity8-ci/7048/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6000
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/463/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1753
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/456
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1648
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1648
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/455
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/454
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4635
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6011
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6011/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26591
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/211/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/461
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/461/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26592

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

> Agree, using the standard UbuntuNumberAnimation feels much smoother, at least here

I'm still seeing a bit of a pause at the end of the animation on my mako.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

> > Agree, using the standard UbuntuNumberAnimation feels much smoother, at
> least here
>
> I'm still seeing a bit of a pause at the end of the animation on my mako.

I guess it's the reverse easing (UbuntuAnimation.StandardEasingReverse), if I try with StandardEasing, it goes away.

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Yeah agreed, StandardEasing looks good to me. Is StandardEasingReverse specifically requested by Design?

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Yes, as per the attached bug report

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Hrm. OK, but I ran Vesa's test code. And it didn't seem to pause at the end of the animation for me.

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

PASSED: Continuous integration, rev:2114
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/40/
Executed test runs:

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

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

Confirming the close animation stuttering on flo. Could not see it on my laptop.

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

FAILED: Continuous integration, rev:2115
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/94/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Please test again, not it feels much smoother on both phone and desktop.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2115
http://jenkins.qa.ubuntu.com/job/unity8-ci/7081/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6045
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/496/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1786
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/489
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1681
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1681
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/488
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/487
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4670
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6056
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6056/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26711
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/238/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/494
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/494/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26709

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

the new animation does behave better on my flo, but it's still not 100% perfect. Paying close attention one can still see the last frames sticking around longer than they should. I don't think it's a problem of this branch, rather some sync stuff happening in Unity.Application when cleaning the app out of the memory. The new animation makes it less obvious.

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

PASSED: Continuous integration, rev:2115
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/94/
Executed test runs:

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

review: Approve (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:2115
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/94/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

But Michael, wouldn't the Unity.Application work only start happening once opacity is already animated down to zero?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2117
http://jenkins.qa.ubuntu.com/job/unity8-ci/7084/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6048
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/499/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1789
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/492
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1684
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1684
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/491
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/490
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4672
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6059
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6059/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26716
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/241/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/497
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/497/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26715

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7084/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

PASSED: Continuous integration, rev:2117
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/101/
Executed test runs:

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

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

PASSED: Continuous integration, rev:2117
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/103/
Executed test runs:

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

review: Approve (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:2117
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/103/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Animation is now smooth on devices, using a small hack to pause the animation at the end before actually closing the application.

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

FAILED: Continuous integration, rev:2118
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/108/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/108/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:2118
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/108/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Looks good to me. The delay after the animation is a gross hack, but not the worst thing. I sat with Lukas and couldn't figure out why it would be needed. But it seems to be for now.

So approved from my end. Animation is smooth with the delay.

Tested it manually.
CI bot is crazy right now, let's wait for it to fix itself before top-approving.
No tags.

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:2118
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/108/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2118
http://jenkins.qa.ubuntu.com/job/unity8-ci/7089/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6056
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/504/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1794
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/497
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1689
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1689
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/496
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/495
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4677
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6067
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6067/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26733
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/244/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/502
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/502/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26734

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

I believe this is what is causing the window to not be visible when opening a maximised app.

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:2118
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/126/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Starting maximized apps should be fixed 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:2120
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/132/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2120
http://jenkins.qa.ubuntu.com/job/unity8-ci/7098/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6065
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/513/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1803
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/506
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1698
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1698
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/505
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/504
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4685
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6076
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6076/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26767
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/252/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/511
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/511/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26768

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7098/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:2121
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/133/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2121
http://jenkins.qa.ubuntu.com/job/unity8-ci/7099/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6069
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/514/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1804
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/507
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1699
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1699
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/506
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/505
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4687
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6080
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6080/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26773
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/253/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/512
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/512/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26772

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

LGTM now, maximized works.

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

FAILED: Continuous integration, rev:2122
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/254/
Executed test runs:

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

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

FAILED: Continuous integration, rev:2122
http://jenkins.qa.ubuntu.com/job/unity8-ci/7197/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6299
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/612/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1902
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/605
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1797
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1797
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/604
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/603
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4842
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6310
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6310/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27248
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/326/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/610
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/610/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27246

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

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

make tryShell
- select desktop size
- unlock screen
- select windowed mode

window gets broken

review: Needs Fixing
2123. By Nick Dedekind

fix disappearing windows

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

OK, fixed the behavior, just not sure where to take the default size from, I have this atm:

PropertyChanges {
  target: decoratedWindow
  requestedWidth: resizeArea.defaultWidth
  requestedHeight: resizeArea.defaultHeight
}

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

Could you please re-merge your prerequisite? You seem to have an outdated version of it....

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

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

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

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

merge prereq

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

> Could you please re-merge your prerequisite? You seem to have an outdated
> version of it....

Rebased

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

FAILED: Continuous integration, rev:2123
http://jenkins.qa.ubuntu.com/job/unity8-ci/7248/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6400
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/663/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1953
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/656
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1848
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1848
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/655
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/654
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4906
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6411
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6411/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27455
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/341/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/661
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/661/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27454

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

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

reevaluate the screen size by making it a binding

fixes tiny windows when switching stages

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
2126. By Lukáš Tinkl

drive just the appDelegate in states and transitions

2127. By Lukáš Tinkl

restore max states

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
2128. By Lukáš Tinkl

partial revert, turn the x/y coords into a binding as well
(they depend on screenWidth/Height too)

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

Done, no more regressions spotted

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
2129. By Lukáš Tinkl

simplify code, fix restoring maximized windows

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
2130. By Lukáš Tinkl

make close() a method of the delegate

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

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

* Did CI run pass? If not, please explain why.
Will never pass due to unity-api dependency from the prerequisites

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

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
2131. By Lukáš Tinkl

merge prereq, fix conflicts

2132. By Lukáš Tinkl

merge lp:~unity-team/unity8/launcher-sizing

2133. By Lukáš Tinkl

merge prereq

2134. By Lukáš Tinkl

merge trunk

2135. By Lukáš Tinkl

handle the close case coming from launcher

2136. By Lukáš Tinkl

fix the launcher ApplicationManager mock

2137. By Lukáš Tinkl

restart app if focusing doesn't work

happens with dash sometimes

2138. By Lukáš Tinkl

make the close animation testable using the App checkbox

2139. By Lukáš Tinkl

fix fullscreen apps being offset by the left margin

2140. By Lukáš Tinkl

disallow resizing windows up past the Panel

2141. By Lukáš Tinkl

fix closing animation for minimized apps

2142. By Lukáš Tinkl

fullscreen apps fix

2143. By Lukáš Tinkl

fix for fullscreen windows height

2144. By Lukáš Tinkl

merge lp:~mzanetti/unity8/launcher-sizing

2145. By Lukáš Tinkl

revert keymap (unrelated) changes

2146. By Lukáš Tinkl

depend on -15 appl framework

2147. By Lukáš Tinkl

implement maximizeHorizontally/Vertically

2148. By Lukáš Tinkl

requestStop() here

2149. By Lukáš Tinkl

save/restore the correct state in all cases

implement (easy now) maximize horizontal/vertical using it

2150. By Lukáš Tinkl

merge trunk

2151. By Lukáš Tinkl

merge trunk

2152. By Lukáš Tinkl

merge trunk

2153. By Lukáš Tinkl

merge trunk, resolve conflicts

2154. By Lukáš Tinkl

merge trunk

2155. By Lukáš Tinkl

merge trunk

Unmerged revisions

2155. By Lukáš Tinkl

merge trunk

2154. By Lukáš Tinkl

merge trunk

2153. By Lukáš Tinkl

merge trunk, resolve conflicts

2152. By Lukáš Tinkl

merge trunk

2151. By Lukáš Tinkl

merge trunk

2150. By Lukáš Tinkl

merge trunk

2149. By Lukáš Tinkl

save/restore the correct state in all cases

implement (easy now) maximize horizontal/vertical using it

2148. By Lukáš Tinkl

requestStop() here

2147. By Lukáš Tinkl

implement maximizeHorizontally/Vertically

2146. By Lukáš Tinkl

depend on -15 appl framework

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Unity/Indicators/indicatorsmanager.cpp'
--- plugins/Unity/Indicators/indicatorsmanager.cpp 2015-12-02 12:02:50 +0000
+++ plugins/Unity/Indicators/indicatorsmanager.cpp 2016-02-17 21:52:10 +0000
@@ -116,10 +116,6 @@
116 QSettings indicator_settings(file_info.absoluteFilePath(), QSettings::IniFormat, this);116 QSettings indicator_settings(file_info.absoluteFilePath(), QSettings::IniFormat, this);
117 const QString name = indicator_settings.value(QStringLiteral("Indicator Service/Name")).toString();117 const QString name = indicator_settings.value(QStringLiteral("Indicator Service/Name")).toString();
118118
119 if (m_platform.isPC() && name == "indicator-keyboard") {
120 return; // convergence: skip this indicator until it works in Mir
121 }
122
123 auto iter = m_indicatorsData.constFind(name);119 auto iter = m_indicatorsData.constFind(name);
124 if (iter != m_indicatorsData.constEnd())120 if (iter != m_indicatorsData.constEnd())
125 {121 {
@@ -289,10 +285,12 @@
289 // 1) enable session indicator conditionally, typically when running in a multisession/multiuser environment285 // 1) enable session indicator conditionally, typically when running in a multisession/multiuser environment
290 // 2) on a PC, switch the battery/power indicator to desktop mode,286 // 2) on a PC, switch the battery/power indicator to desktop mode,
291 // can't control brightness for now and phone-on-desktop broken (FIXME)287 // can't control brightness for now and phone-on-desktop broken (FIXME)
288 // 3) enable the keyboard switcher on u8 (it has no phone profile yet, FIXME)
292 //289 //
293 // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs)290 // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs)
294 if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession())291 if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession())
295 || (new_indicator->identifier() == QStringLiteral("indicator-power") && m_platform.isPC())) {292 || (new_indicator->identifier() == QStringLiteral("indicator-power") && m_platform.isPC())
293 || (new_indicator->identifier() == QStringLiteral("indicator-keyboard"))) {
296 new_indicator->setProfile("desktop");294 new_indicator->setProfile("desktop");
297 } else {295 } else {
298 new_indicator->setProfile(m_profile);296 new_indicator->setProfile(m_profile);
299297
=== modified file 'qml/Panel/Indicators/MenuItemFactory.qml'
--- qml/Panel/Indicators/MenuItemFactory.qml 2016-01-11 17:36:56 +0000
+++ qml/Panel/Indicators/MenuItemFactory.qml 2016-02-17 21:52:10 +0000
@@ -300,6 +300,49 @@
300 }300 }
301301
302 Component {302 Component {
303 id: keymapMenu;
304
305 Menus.CheckableMenu {
306 id: keymapItem
307 objectName: "keymapMenu"
308 property QtObject menuData: null
309 property int menuIndex: -1
310 property bool serverChecked: menuData && menuData.isToggled || false
311
312 text: menuData && menuData.label || ""
313 enabled: menuData && menuData.sensitive && !serverChecked || false
314 checked: serverChecked
315 highlightWhenPressed: false
316
317 ServerPropertySynchroniser {
318 objectName: "sync"
319 syncTimeout: Utils.Constants.indicatorValueTimeout
320
321 serverTarget: keymapItem
322 serverProperty: "serverChecked"
323 userTarget: keymapItem
324 userProperty: "checked"
325
326 onSyncTriggered: {
327 var keymapIndex = keymapItem.menuIndex;
328 keymapActionGroup.currentAction.updateState(keymapIndex);
329 }
330 }
331
332 QDBusActionGroup {
333 id: keymapActionGroup
334 busType: DBus.SessionBus
335 busName: "com.canonical.indicator.keyboard"
336 objectPath: "/com/canonical/indicator/keyboard"
337
338 property variant currentAction: action("current")
339
340 Component.onCompleted: keymapActionGroup.start()
341 }
342 }
343 }
344
345 Component {
303 id: checkableMenu;346 id: checkableMenu;
304347
305 Menus.CheckableMenu {348 Menus.CheckableMenu {
@@ -994,6 +1037,9 @@
994 console.debug("Don't know how to make " + modelData.type + " for " + context);1037 console.debug("Don't know how to make " + modelData.type + " for " + context);
995 }1038 }
996 if (modelData.isCheck || modelData.isRadio) {1039 if (modelData.isCheck || modelData.isRadio) {
1040 if (context === "indicator-keyboard" ) {
1041 return keymapMenu;
1042 }
997 return checkableMenu;1043 return checkableMenu;
998 }1044 }
999 if (modelData.isSeparator) {1045 if (modelData.isSeparator) {
10001046
=== modified file 'qml/Stages/ApplicationWindow.qml'
--- qml/Stages/ApplicationWindow.qml 2016-02-17 21:52:09 +0000
+++ qml/Stages/ApplicationWindow.qml 2016-02-17 21:52:10 +0000
@@ -29,6 +29,7 @@
29 property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true29 property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true
30 readonly property string title: sessionContainer.surface && sessionContainer.surface.name !== "" ?30 readonly property string title: sessionContainer.surface && sessionContainer.surface.name !== "" ?
31 sessionContainer.surface.name : d.name31 sessionContainer.surface.name : d.name
32 readonly property string currentKeymap: sessionContainer.surfaceContainer ? sessionContainer.surfaceContainer.currentKeymap : "us"
3233
33 // to be set from outside34 // to be set from outside
34 property QtObject application35 property QtObject application
@@ -37,6 +38,10 @@
37 property int requestedWidth: -138 property int requestedWidth: -1
38 property int requestedHeight: -139 property int requestedHeight: -1
3940
41 function switchToKeymap(index) {
42 sessionContainer.surfaceContainer.switchToKeymap(index);
43 }
44
40 readonly property int minimumWidth: sessionContainer.surface ? sessionContainer.surface.minimumWidth : 045 readonly property int minimumWidth: sessionContainer.surface ? sessionContainer.surface.minimumWidth : 0
41 readonly property int minimumHeight: sessionContainer.surface ? sessionContainer.surface.minimumHeight : 046 readonly property int minimumHeight: sessionContainer.surface ? sessionContainer.surface.minimumHeight : 0
42 readonly property int maximumWidth: sessionContainer.surface ? sessionContainer.surface.maximumWidth : 047 readonly property int maximumWidth: sessionContainer.surface ? sessionContainer.surface.maximumWidth : 0
@@ -44,14 +49,6 @@
44 readonly property int widthIncrement: sessionContainer.surface ? sessionContainer.surface.widthIncrement : 049 readonly property int widthIncrement: sessionContainer.surface ? sessionContainer.surface.widthIncrement : 0
45 readonly property int heightIncrement: sessionContainer.surface ? sessionContainer.surface.heightIncrement : 050 readonly property int heightIncrement: sessionContainer.surface ? sessionContainer.surface.heightIncrement : 0
4651
47 function nextKeymap() {
48 sessionContainer.surfaceContainer.nextKeymap();
49 }
50
51 function previousKeymap() {
52 sessionContainer.surfaceContainer.previousKeymap();
53 }
54
55 QtObject {52 QtObject {
56 id: d53 id: d
5754
5855
=== modified file 'qml/Stages/DecoratedWindow.qml'
--- qml/Stages/DecoratedWindow.qml 2016-02-17 21:52:09 +0000
+++ qml/Stages/DecoratedWindow.qml 2016-02-17 21:52:10 +0000
@@ -31,6 +31,7 @@
31 property alias active: decoration.active31 property alias active: decoration.active
32 property alias title: decoration.title32 property alias title: decoration.title
33 property alias fullscreen: applicationWindow.fullscreen33 property alias fullscreen: applicationWindow.fullscreen
34 readonly property alias currentKeymap: applicationWindow.currentKeymap
3435
35 readonly property bool decorationShown: !fullscreen36 readonly property bool decorationShown: !fullscreen
36 property bool highlightShown: false37 property bool highlightShown: false
@@ -51,12 +52,8 @@
51 signal minimize()52 signal minimize()
52 signal decorationPressed()53 signal decorationPressed()
5354
54 function nextKeymap() {55 function switchToKeymap(index) {
55 applicationWindow.nextKeymap();56 applicationWindow.switchToKeymap(index);
56 }
57
58 function previousKeymap() {
59 applicationWindow.previousKeymap();
60 }57 }
6158
62 Rectangle {59 Rectangle {
6360
=== modified file 'qml/Stages/DesktopStage.qml'
--- qml/Stages/DesktopStage.qml 2016-02-17 21:52:09 +0000
+++ qml/Stages/DesktopStage.qml 2016-02-17 21:52:10 +0000
@@ -22,6 +22,7 @@
22import Utils 0.122import Utils 0.1
23import Ubuntu.Gestures 0.123import Ubuntu.Gestures 0.1
24import GlobalShortcut 1.024import GlobalShortcut 1.0
25import QMenuModel 0.1 as QMenuModel
25import AccountsService 0.126import AccountsService 0.1
2627
27AbstractStage {28AbstractStage {
@@ -61,9 +62,8 @@
61 }62 }
6263
63 onFocusRequested: {64 onFocusRequested: {
64 var appIndex = priv.indexOf(appId);65 var delegate = priv.appDelegate(appId);
65 var appDelegate = appRepeater.itemAt(appIndex);66 delegate.restore();
66 appDelegate.restore();
6767
68 if (spread.state == "altTab") {68 if (spread.state == "altTab") {
69 spread.cancel();69 spread.cancel();
@@ -74,7 +74,7 @@
74 GlobalShortcut {74 GlobalShortcut {
75 id: closeWindowShortcut75 id: closeWindowShortcut
76 shortcut: Qt.AltModifier|Qt.Key_F476 shortcut: Qt.AltModifier|Qt.Key_F4
77 onTriggered: ApplicationManager.stopApplication(priv.focusedAppId)77 onTriggered: priv.focusedAppDelegate.close()
78 active: priv.focusedAppId !== ""78 active: priv.focusedAppId !== ""
79 }79 }
8080
@@ -121,14 +121,12 @@
121121
122 GlobalShortcut {122 GlobalShortcut {
123 shortcut: Qt.MetaModifier|Qt.Key_Space123 shortcut: Qt.MetaModifier|Qt.Key_Space
124 onTriggered: priv.focusedAppDelegate.nextKeymap()124 onTriggered: priv.nextKeymap()
125 active: priv.focusedAppDelegate !== null
126 }125 }
127126
128 GlobalShortcut {127 GlobalShortcut {
129 shortcut: Qt.MetaModifier|Qt.ShiftModifier|Qt.Key_Space128 shortcut: Qt.MetaModifier|Qt.ShiftModifier|Qt.Key_Space
130 onTriggered: priv.focusedAppDelegate.previousKeymap()129 onTriggered: priv.previousKeymap()
131 active: priv.focusedAppDelegate !== null
132 }130 }
133131
134 QtObject {132 QtObject {
@@ -188,13 +186,72 @@
188 }186 }
189 }187 }
190 }188 }
189
190 function appDelegate(appId) {
191 var appIndex = indexOf(appId);
192 return appRepeater.itemAt(appIndex);
193 }
194
195 // keymap
196 readonly property bool globalKeymapSwitching: true // TODO make this configurable in the future
197 readonly property string activeKeymap: priv.focusedAppDelegate ? priv.focusedAppDelegate.currentKeymap : "us"
198 onActiveKeymapChanged: {
199 var activeIndex = AccountsService.keymaps.indexOf(activeKeymap);
200 if (activeIndex !== -1) {
201 keymapActionGroup.activeAction.updateState(activeIndex); // tell the keyboard indicator about the active keymap
202 }
203 }
204
205 // TODO Work around http://pad.lv/1293478 until qmenumodel knows to cast
206 readonly property int stepUp: -1
207 readonly property int stepDown: 1
208
209 function nextKeymap() {
210 keymapActionGroup.nextAction.activate(stepUp);
211 }
212
213 function previousKeymap() {
214 keymapActionGroup.nextAction.activate(stepDown);
215 }
216
217 function switchKeymaps(index) { // switch all surfaces to keymap with index
218 for (var i = 0; i < appRepeater.count; i++) {
219 var appDelegate = appRepeater.itemAt(i);
220 if (appDelegate) {
221 appDelegate.switchToKeymap(index);
222 }
223 }
224 }
225 }
226
227 QMenuModel.QDBusActionGroup {
228 id: keymapActionGroup
229 busType: QMenuModel.DBus.SessionBus
230 busName: "com.canonical.indicator.keyboard"
231 objectPath: "/com/canonical/indicator/keyboard"
232
233 property variant activeAction: action("active")
234 property variant nextAction: action("scroll")
235
236 readonly property int currentLayoutIndex: action("current") ? action("current").state : 0
237 onCurrentLayoutIndexChanged: {
238 if (priv.globalKeymapSwitching) {
239 priv.switchKeymaps(currentLayoutIndex);
240 } else if (priv.focusedAppDelegate) {
241 priv.focusedAppDelegate.switchToKeymap(currentLayoutIndex);
242 }
243 }
244
245 Component.onCompleted: {
246 keymapActionGroup.start();
247 }
191 }248 }
192249
193 Connections {250 Connections {
194 target: PanelState251 target: PanelState
195 onClose: {252 onClose: if (priv.focusedAppDelegate) {
196 ApplicationManager.stopApplication(ApplicationManager.focusedApplicationId)253 priv.focusedAppDelegate.close()
197 }254 }
198 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();255 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
199 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel256 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
200 && priv.focusedAppDelegate.restoreFromMaximized();257 && priv.focusedAppDelegate.restoreFromMaximized();
@@ -237,7 +294,6 @@
237 PanelState.dropShadow = false;294 PanelState.dropShadow = false;
238 }295 }
239296
240
241 FocusScope {297 FocusScope {
242 id: appContainer298 id: appContainer
243 objectName: "appContainer"299 objectName: "appContainer"
@@ -295,6 +351,7 @@
295 readonly property string appName: model.name351 readonly property string appName: model.name
296 property bool visuallyMaximized: false352 property bool visuallyMaximized: false
297 property bool visuallyMinimized: false353 property bool visuallyMinimized: false
354 readonly property alias currentKeymap: decoratedWindow.currentKeymap
298355
299 onFocusChanged: {356 onFocusChanged: {
300 if (focus && ApplicationManager.focusedApplicationId !== appId) {357 if (focus && ApplicationManager.focusedApplicationId !== appId) {
@@ -363,12 +420,12 @@
363 ApplicationManager.focusApplication(appId);420 ApplicationManager.focusApplication(appId);
364 }421 }
365422
366 function nextKeymap() {423 function switchToKeymap(index) {
367 decoratedWindow.nextKeymap();424 decoratedWindow.switchToKeymap(index);
368 }425 }
369426
370 function previousKeymap() {427 function close() {
371 decoratedWindow.previousKeymap();428 state = "closing";
372 }429 }
373430
374 function playFocusAnimation() {431 function playFocusAnimation() {
@@ -386,6 +443,14 @@
386443
387 states: [444 states: [
388 State {445 State {
446 name: "closing"
447 PropertyChanges { // freeze the values
448 target: appDelegate; explicit: true; restoreEntryValues: false;
449 x: appDelegate.x; y: appDelegate.y
450 requestedWidth: appDelegate.width; requestedHeight: appDelegate.height
451 }
452 },
453 State {
389 name: "fullscreen"; when: decoratedWindow.fullscreen454 name: "fullscreen"; when: decoratedWindow.fullscreen
390 PropertyChanges {455 PropertyChanges {
391 target: appDelegate;456 target: appDelegate;
@@ -400,7 +465,8 @@
400 PropertyChanges {465 PropertyChanges {
401 target: appDelegate;466 target: appDelegate;
402 visuallyMinimized: false;467 visuallyMinimized: false;
403 visuallyMaximized: false468 visuallyMaximized: false;
469 opacity: 1; scale: 1
404 }470 }
405 },471 },
406 State {472 State {
@@ -410,7 +476,8 @@
410 x: root.leftMargin; y: 0;476 x: root.leftMargin; y: 0;
411 requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appContainer.height;477 requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appContainer.height;
412 visuallyMinimized: false;478 visuallyMinimized: false;
413 visuallyMaximized: true479 visuallyMaximized: true;
480 opacity: 1; scale: 1
414 }481 }
415 },482 },
416 State {483 State {
@@ -437,17 +504,32 @@
437 ]504 ]
438 transitions: [505 transitions: [
439 Transition {506 Transition {
507 from: ",minimized"
440 to: "normal"508 to: "normal"
441 enabled: appDelegate.animationsEnabled509 enabled: appDelegate.animationsEnabled
442 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }510 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
443 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }511 UbuntuNumberAnimation { target: appDelegate; properties: "x,y" }
512 UbuntuNumberAnimation {
513 target: appDelegate
514 property: 'scale'
515 from: 0.85
516 to: 1
517 duration: UbuntuAnimation.SnapDuration
518 }
519 UbuntuNumberAnimation {
520 target: appDelegate
521 property: 'opacity'
522 from: 0
523 to: 1
524 duration: UbuntuAnimation.SnapDuration
525 }
444 },526 },
445 Transition {527 Transition {
446 to: "minimized"528 to: "minimized"
447 enabled: appDelegate.animationsEnabled529 enabled: appDelegate.animationsEnabled
448 PropertyAction { target: appDelegate; property: "visuallyMaximized" }530 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
449 SequentialAnimation {531 SequentialAnimation {
450 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }532 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight" }
451 PropertyAction { target: appDelegate; property: "visuallyMinimized" }533 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
452 ScriptAction {534 ScriptAction {
453 script: {535 script: {
@@ -459,11 +541,42 @@
459 }541 }
460 },542 },
461 Transition {543 Transition {
544 to: "closing"
545 SequentialAnimation {
546 PropertyAction { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight" }
547 ParallelAnimation {
548 UbuntuNumberAnimation {
549 target: appDelegate
550 property: 'scale'
551 from: 1
552 to: 0.85
553 duration: UbuntuAnimation.SnapDuration
554 easing: UbuntuAnimation.StandardEasingReverse
555 }
556 UbuntuNumberAnimation {
557 target: appDelegate
558 property: 'opacity'
559 from: 1
560 to: 0
561 duration: UbuntuAnimation.SnapDuration
562 easing: UbuntuAnimation.StandardEasingReverse
563 }
564 }
565 // hack: make sure the animation has really finished before closing the app
566 PauseAnimation { duration: UbuntuAnimation.SnapDuration }
567 ScriptAction {
568 script: {
569 ApplicationManager.stopApplication(appId);
570 }
571 }
572 }
573 },
574 Transition {
462 to: "*" //maximized and fullscreen575 to: "*" //maximized and fullscreen
463 enabled: appDelegate.animationsEnabled576 enabled: appDelegate.animationsEnabled
464 PropertyAction { target: appDelegate; property: "visuallyMinimized" }577 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
465 SequentialAnimation {578 SequentialAnimation {
466 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }579 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight" }
467 PropertyAction { target: appDelegate; property: "visuallyMaximized" }580 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
468 }581 }
469 }582 }
@@ -500,7 +613,7 @@
500 active: ApplicationManager.focusedApplicationId === model.appId613 active: ApplicationManager.focusedApplicationId === model.appId
501 focus: true614 focus: true
502615
503 onClose: ApplicationManager.stopApplication(model.appId)616 onClose: appDelegate.close()
504 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight617 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
505 ? appDelegate.restoreFromMaximized() : appDelegate.maximize()618 ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
506 onMinimize: appDelegate.minimize()619 onMinimize: appDelegate.minimize()
507620
=== modified file 'qml/Stages/SurfaceContainer.qml'
--- qml/Stages/SurfaceContainer.qml 2016-02-17 21:52:09 +0000
+++ qml/Stages/SurfaceContainer.qml 2016-02-17 21:52:10 +0000
@@ -48,32 +48,13 @@
48 }48 }
49 }49 }
5050
51 function nextKeymap() {51 function switchToKeymap(index) {
52 var currentIndex = keymaps.indexOf(currentKeymap);52 currentKeymap = keymaps[index];
53 var nextIndex = 0;53 var keymap = currentKeymap.split("+");
5454
55 if (currentIndex !== -1 && currentIndex < keymaps.length - 1) {55 if (surface) {
56 nextIndex = currentIndex + 1;56 surface.setKeymap(keymap[0], keymap[1] || "");
57 }57 }
58
59 currentKeymap = keymaps[nextIndex];
60 var keymap = currentKeymap.split("+");
61
62 surface.setKeymap(keymap[0], keymap[1] || "");
63 }
64
65 function previousKeymap() {
66 var currentIndex = keymaps.indexOf(currentKeymap);
67 var prevIndex = keymaps.length - 1;
68
69 if (currentIndex > 0) {
70 prevIndex = currentIndex - 1;
71 }
72
73 currentKeymap = keymaps[prevIndex];
74 var keymap = currentKeymap.split("+");
75
76 surface.setKeymap(keymap[0], keymap[1] || "");
77 }58 }
7859
79 InputWatcher {60 InputWatcher {
8061
=== modified file 'qml/Stages/WindowResizeArea.qml'
--- qml/Stages/WindowResizeArea.qml 2016-02-17 21:52:09 +0000
+++ qml/Stages/WindowResizeArea.qml 2016-02-17 21:52:10 +0000
@@ -73,10 +73,10 @@
73 var windowGeometry = windowStateStorage.getGeometry(root.windowId,73 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
74 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));74 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
7575
76 target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin);76 target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
77 target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);77 target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight); });
78 target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin)78 target.x = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin); });
79 target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)79 target.y = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });
8080
81 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)81 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
82 if (windowState === WindowStateStorage.WindowStateMaximized) {82 if (windowState === WindowStateStorage.WindowStateMaximized) {
@@ -86,7 +86,7 @@
86 }86 }
8787
88 Component.onDestruction: {88 Component.onDestruction: {
89 windowStateStorage.saveState(root.windowId, target.state == "maximized" ? WindowStateStorage.WindowStateMaximized : WindowStateStorage.WindowStateNormal)89 windowStateStorage.saveState(root.windowId, target.maximized ? WindowStateStorage.WindowStateMaximized : WindowStateStorage.WindowStateNormal)
90 windowStateStorage.saveGeometry(root.windowId, Qt.rect(priv.normalX, priv.normalY, priv.normalWidth, priv.normalHeight))90 windowStateStorage.saveGeometry(root.windowId, Qt.rect(priv.normalX, priv.normalY, priv.normalWidth, priv.normalHeight))
91 }91 }
9292
9393
=== modified file 'tests/qmltests/Stages/tst_DesktopStage.qml'
--- tests/qmltests/Stages/tst_DesktopStage.qml 2016-02-17 21:52:09 +0000
+++ tests/qmltests/Stages/tst_DesktopStage.qml 2016-02-17 21:52:10 +0000
@@ -362,7 +362,7 @@
362 verify(appDelegate);362 verify(appDelegate);
363 ApplicationManager.focusApplication(appName);363 ApplicationManager.focusApplication(appName);
364 keyClick(Qt.Key_F4, Qt.AltModifier); // Alt+F4 shortcut to close364 keyClick(Qt.Key_F4, Qt.AltModifier); // Alt+F4 shortcut to close
365 verify(ApplicationManager.count == 2); // verify the app is gone365 tryCompare(ApplicationManager, "count", 2); // verify the app is gone
366 verify(ApplicationManager.findApplication(appName) === null); // and it's not in running apps366 verify(ApplicationManager.findApplication(appName) === null); // and it's not in running apps
367 }367 }
368368
@@ -409,8 +409,8 @@
409409
410 // restore410 // restore
411 dialerDelegate.restoreFromMaximized();411 dialerDelegate.restoreFromMaximized();
412 compare(dashApp.session.lastSurface.visible, true);412 tryCompare(dashApp.session.lastSurface, "visible", true);
413 compare(gmailApp.session.lastSurface.visible, true);413 tryCompare(gmailApp.session.lastSurface, "visible", true);
414 }414 }
415415
416 function test_applicationsBecomeVisibleWhenOccludingAppRemoved() {416 function test_applicationsBecomeVisibleWhenOccludingAppRemoved() {
417417
=== modified file 'tests/qmltests/Stages/tst_WindowResizeArea.qml'
--- tests/qmltests/Stages/tst_WindowResizeArea.qml 2015-11-30 18:25:47 +0000
+++ tests/qmltests/Stages/tst_WindowResizeArea.qml 2016-02-17 21:52:10 +0000
@@ -56,6 +56,7 @@
56 property real widthIncrement: 056 property real widthIncrement: 0
57 property real heightIncrement: 057 property real heightIncrement: 0
58 state: "normal"58 state: "normal"
59 readonly property bool maximized: state == "maximized"
5960
60 function maximize() {61 function maximize() {
61 state = "maximized"62 state = "maximized"
6263
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2016-02-17 21:52:09 +0000
+++ tests/qmltests/tst_Shell.qml 2016-02-17 21:52:10 +0000
@@ -2117,6 +2117,7 @@
2117 loadShell("desktop");2117 loadShell("desktop");
2118 shell.usageScenario = "desktop";2118 shell.usageScenario = "desktop";
2119 waitForRendering(shell);2119 waitForRendering(shell);
2120
2120 var appContainer = findChild(shell, "appContainer");2121 var appContainer = findChild(shell, "appContainer");
2121 var launcher = findChild(shell, "launcher");2122 var launcher = findChild(shell, "launcher");
21222123

Subscribers

People subscribed via source and target branches