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
Nick Dedekind Pending
Michael Terry 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 on 2016-02-10

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 on 2016-02-10

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 on 2016-02-10

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 on 2016-02-10

drive just the appDelegate in states and transitions

2127. By Lukáš Tinkl on 2016-02-10

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 on 2016-02-10

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 on 2016-02-10

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 on 2016-02-11

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 on 2016-02-17

merge prereq, fix conflicts

2132. By Lukáš Tinkl on 2016-02-17

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

2133. By Lukáš Tinkl on 2016-02-19

merge prereq

2134. By Lukáš Tinkl on 2016-02-24

merge trunk

2135. By Lukáš Tinkl on 2016-02-24

handle the close case coming from launcher

2136. By Lukáš Tinkl on 2016-02-24

fix the launcher ApplicationManager mock

2137. By Lukáš Tinkl on 2016-02-26

restart app if focusing doesn't work

happens with dash sometimes

2138. By Lukáš Tinkl on 2016-02-26

make the close animation testable using the App checkbox

2139. By Lukáš Tinkl on 2016-02-27

fix fullscreen apps being offset by the left margin

2140. By Lukáš Tinkl on 2016-02-27

disallow resizing windows up past the Panel

2141. By Lukáš Tinkl on 2016-02-28

fix closing animation for minimized apps

2142. By Lukáš Tinkl on 2016-02-29

fullscreen apps fix

2143. By Lukáš Tinkl on 2016-02-29

fix for fullscreen windows height

2144. By Lukáš Tinkl on 2016-03-06

merge lp:~mzanetti/unity8/launcher-sizing

2145. By Lukáš Tinkl on 2016-03-06

revert keymap (unrelated) changes

2146. By Lukáš Tinkl on 2016-03-06

depend on -15 appl framework

2147. By Lukáš Tinkl on 2016-03-06

implement maximizeHorizontally/Vertically

2148. By Lukáš Tinkl on 2016-03-07

requestStop() here

2149. By Lukáš Tinkl on 2016-03-07

save/restore the correct state in all cases

implement (easy now) maximize horizontal/vertical using it

2150. By Lukáš Tinkl on 2016-03-12

merge trunk

2151. By Lukáš Tinkl on 2016-03-21

merge trunk

2152. By Lukáš Tinkl on 2016-03-22

merge trunk

2153. By Lukáš Tinkl on 2016-03-24

merge trunk, resolve conflicts

2154. By Lukáš Tinkl on 2016-04-07

merge trunk

2155. By Lukáš Tinkl on 2016-04-14

merge trunk

Unmerged revisions

2155. By Lukáš Tinkl on 2016-04-14

merge trunk

2154. By Lukáš Tinkl on 2016-04-07

merge trunk

2153. By Lukáš Tinkl on 2016-03-24

merge trunk, resolve conflicts

2152. By Lukáš Tinkl on 2016-03-22

merge trunk

2151. By Lukáš Tinkl on 2016-03-21

merge trunk

2150. By Lukáš Tinkl on 2016-03-12

merge trunk

2149. By Lukáš Tinkl on 2016-03-07

save/restore the correct state in all cases

implement (easy now) maximize horizontal/vertical using it

2148. By Lukáš Tinkl on 2016-03-07

requestStop() here

2147. By Lukáš Tinkl on 2016-03-06

implement maximizeHorizontally/Vertically

2146. By Lukáš Tinkl on 2016-03-06

depend on -15 appl framework

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/Indicators/indicatorsmanager.cpp'
2--- plugins/Unity/Indicators/indicatorsmanager.cpp 2015-12-02 12:02:50 +0000
3+++ plugins/Unity/Indicators/indicatorsmanager.cpp 2016-02-17 21:52:10 +0000
4@@ -116,10 +116,6 @@
5 QSettings indicator_settings(file_info.absoluteFilePath(), QSettings::IniFormat, this);
6 const QString name = indicator_settings.value(QStringLiteral("Indicator Service/Name")).toString();
7
8- if (m_platform.isPC() && name == "indicator-keyboard") {
9- return; // convergence: skip this indicator until it works in Mir
10- }
11-
12 auto iter = m_indicatorsData.constFind(name);
13 if (iter != m_indicatorsData.constEnd())
14 {
15@@ -289,10 +285,12 @@
16 // 1) enable session indicator conditionally, typically when running in a multisession/multiuser environment
17 // 2) on a PC, switch the battery/power indicator to desktop mode,
18 // can't control brightness for now and phone-on-desktop broken (FIXME)
19+ // 3) enable the keyboard switcher on u8 (it has no phone profile yet, FIXME)
20 //
21 // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs)
22 if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession())
23- || (new_indicator->identifier() == QStringLiteral("indicator-power") && m_platform.isPC())) {
24+ || (new_indicator->identifier() == QStringLiteral("indicator-power") && m_platform.isPC())
25+ || (new_indicator->identifier() == QStringLiteral("indicator-keyboard"))) {
26 new_indicator->setProfile("desktop");
27 } else {
28 new_indicator->setProfile(m_profile);
29
30=== modified file 'qml/Panel/Indicators/MenuItemFactory.qml'
31--- qml/Panel/Indicators/MenuItemFactory.qml 2016-01-11 17:36:56 +0000
32+++ qml/Panel/Indicators/MenuItemFactory.qml 2016-02-17 21:52:10 +0000
33@@ -300,6 +300,49 @@
34 }
35
36 Component {
37+ id: keymapMenu;
38+
39+ Menus.CheckableMenu {
40+ id: keymapItem
41+ objectName: "keymapMenu"
42+ property QtObject menuData: null
43+ property int menuIndex: -1
44+ property bool serverChecked: menuData && menuData.isToggled || false
45+
46+ text: menuData && menuData.label || ""
47+ enabled: menuData && menuData.sensitive && !serverChecked || false
48+ checked: serverChecked
49+ highlightWhenPressed: false
50+
51+ ServerPropertySynchroniser {
52+ objectName: "sync"
53+ syncTimeout: Utils.Constants.indicatorValueTimeout
54+
55+ serverTarget: keymapItem
56+ serverProperty: "serverChecked"
57+ userTarget: keymapItem
58+ userProperty: "checked"
59+
60+ onSyncTriggered: {
61+ var keymapIndex = keymapItem.menuIndex;
62+ keymapActionGroup.currentAction.updateState(keymapIndex);
63+ }
64+ }
65+
66+ QDBusActionGroup {
67+ id: keymapActionGroup
68+ busType: DBus.SessionBus
69+ busName: "com.canonical.indicator.keyboard"
70+ objectPath: "/com/canonical/indicator/keyboard"
71+
72+ property variant currentAction: action("current")
73+
74+ Component.onCompleted: keymapActionGroup.start()
75+ }
76+ }
77+ }
78+
79+ Component {
80 id: checkableMenu;
81
82 Menus.CheckableMenu {
83@@ -994,6 +1037,9 @@
84 console.debug("Don't know how to make " + modelData.type + " for " + context);
85 }
86 if (modelData.isCheck || modelData.isRadio) {
87+ if (context === "indicator-keyboard" ) {
88+ return keymapMenu;
89+ }
90 return checkableMenu;
91 }
92 if (modelData.isSeparator) {
93
94=== modified file 'qml/Stages/ApplicationWindow.qml'
95--- qml/Stages/ApplicationWindow.qml 2016-02-17 21:52:09 +0000
96+++ qml/Stages/ApplicationWindow.qml 2016-02-17 21:52:10 +0000
97@@ -29,6 +29,7 @@
98 property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true
99 readonly property string title: sessionContainer.surface && sessionContainer.surface.name !== "" ?
100 sessionContainer.surface.name : d.name
101+ readonly property string currentKeymap: sessionContainer.surfaceContainer ? sessionContainer.surfaceContainer.currentKeymap : "us"
102
103 // to be set from outside
104 property QtObject application
105@@ -37,6 +38,10 @@
106 property int requestedWidth: -1
107 property int requestedHeight: -1
108
109+ function switchToKeymap(index) {
110+ sessionContainer.surfaceContainer.switchToKeymap(index);
111+ }
112+
113 readonly property int minimumWidth: sessionContainer.surface ? sessionContainer.surface.minimumWidth : 0
114 readonly property int minimumHeight: sessionContainer.surface ? sessionContainer.surface.minimumHeight : 0
115 readonly property int maximumWidth: sessionContainer.surface ? sessionContainer.surface.maximumWidth : 0
116@@ -44,14 +49,6 @@
117 readonly property int widthIncrement: sessionContainer.surface ? sessionContainer.surface.widthIncrement : 0
118 readonly property int heightIncrement: sessionContainer.surface ? sessionContainer.surface.heightIncrement : 0
119
120- function nextKeymap() {
121- sessionContainer.surfaceContainer.nextKeymap();
122- }
123-
124- function previousKeymap() {
125- sessionContainer.surfaceContainer.previousKeymap();
126- }
127-
128 QtObject {
129 id: d
130
131
132=== modified file 'qml/Stages/DecoratedWindow.qml'
133--- qml/Stages/DecoratedWindow.qml 2016-02-17 21:52:09 +0000
134+++ qml/Stages/DecoratedWindow.qml 2016-02-17 21:52:10 +0000
135@@ -31,6 +31,7 @@
136 property alias active: decoration.active
137 property alias title: decoration.title
138 property alias fullscreen: applicationWindow.fullscreen
139+ readonly property alias currentKeymap: applicationWindow.currentKeymap
140
141 readonly property bool decorationShown: !fullscreen
142 property bool highlightShown: false
143@@ -51,12 +52,8 @@
144 signal minimize()
145 signal decorationPressed()
146
147- function nextKeymap() {
148- applicationWindow.nextKeymap();
149- }
150-
151- function previousKeymap() {
152- applicationWindow.previousKeymap();
153+ function switchToKeymap(index) {
154+ applicationWindow.switchToKeymap(index);
155 }
156
157 Rectangle {
158
159=== modified file 'qml/Stages/DesktopStage.qml'
160--- qml/Stages/DesktopStage.qml 2016-02-17 21:52:09 +0000
161+++ qml/Stages/DesktopStage.qml 2016-02-17 21:52:10 +0000
162@@ -22,6 +22,7 @@
163 import Utils 0.1
164 import Ubuntu.Gestures 0.1
165 import GlobalShortcut 1.0
166+import QMenuModel 0.1 as QMenuModel
167 import AccountsService 0.1
168
169 AbstractStage {
170@@ -61,9 +62,8 @@
171 }
172
173 onFocusRequested: {
174- var appIndex = priv.indexOf(appId);
175- var appDelegate = appRepeater.itemAt(appIndex);
176- appDelegate.restore();
177+ var delegate = priv.appDelegate(appId);
178+ delegate.restore();
179
180 if (spread.state == "altTab") {
181 spread.cancel();
182@@ -74,7 +74,7 @@
183 GlobalShortcut {
184 id: closeWindowShortcut
185 shortcut: Qt.AltModifier|Qt.Key_F4
186- onTriggered: ApplicationManager.stopApplication(priv.focusedAppId)
187+ onTriggered: priv.focusedAppDelegate.close()
188 active: priv.focusedAppId !== ""
189 }
190
191@@ -121,14 +121,12 @@
192
193 GlobalShortcut {
194 shortcut: Qt.MetaModifier|Qt.Key_Space
195- onTriggered: priv.focusedAppDelegate.nextKeymap()
196- active: priv.focusedAppDelegate !== null
197+ onTriggered: priv.nextKeymap()
198 }
199
200 GlobalShortcut {
201 shortcut: Qt.MetaModifier|Qt.ShiftModifier|Qt.Key_Space
202- onTriggered: priv.focusedAppDelegate.previousKeymap()
203- active: priv.focusedAppDelegate !== null
204+ onTriggered: priv.previousKeymap()
205 }
206
207 QtObject {
208@@ -188,13 +186,72 @@
209 }
210 }
211 }
212+
213+ function appDelegate(appId) {
214+ var appIndex = indexOf(appId);
215+ return appRepeater.itemAt(appIndex);
216+ }
217+
218+ // keymap
219+ readonly property bool globalKeymapSwitching: true // TODO make this configurable in the future
220+ readonly property string activeKeymap: priv.focusedAppDelegate ? priv.focusedAppDelegate.currentKeymap : "us"
221+ onActiveKeymapChanged: {
222+ var activeIndex = AccountsService.keymaps.indexOf(activeKeymap);
223+ if (activeIndex !== -1) {
224+ keymapActionGroup.activeAction.updateState(activeIndex); // tell the keyboard indicator about the active keymap
225+ }
226+ }
227+
228+ // TODO Work around http://pad.lv/1293478 until qmenumodel knows to cast
229+ readonly property int stepUp: -1
230+ readonly property int stepDown: 1
231+
232+ function nextKeymap() {
233+ keymapActionGroup.nextAction.activate(stepUp);
234+ }
235+
236+ function previousKeymap() {
237+ keymapActionGroup.nextAction.activate(stepDown);
238+ }
239+
240+ function switchKeymaps(index) { // switch all surfaces to keymap with index
241+ for (var i = 0; i < appRepeater.count; i++) {
242+ var appDelegate = appRepeater.itemAt(i);
243+ if (appDelegate) {
244+ appDelegate.switchToKeymap(index);
245+ }
246+ }
247+ }
248+ }
249+
250+ QMenuModel.QDBusActionGroup {
251+ id: keymapActionGroup
252+ busType: QMenuModel.DBus.SessionBus
253+ busName: "com.canonical.indicator.keyboard"
254+ objectPath: "/com/canonical/indicator/keyboard"
255+
256+ property variant activeAction: action("active")
257+ property variant nextAction: action("scroll")
258+
259+ readonly property int currentLayoutIndex: action("current") ? action("current").state : 0
260+ onCurrentLayoutIndexChanged: {
261+ if (priv.globalKeymapSwitching) {
262+ priv.switchKeymaps(currentLayoutIndex);
263+ } else if (priv.focusedAppDelegate) {
264+ priv.focusedAppDelegate.switchToKeymap(currentLayoutIndex);
265+ }
266+ }
267+
268+ Component.onCompleted: {
269+ keymapActionGroup.start();
270+ }
271 }
272
273 Connections {
274 target: PanelState
275- onClose: {
276- ApplicationManager.stopApplication(ApplicationManager.focusedApplicationId)
277- }
278+ onClose: if (priv.focusedAppDelegate) {
279+ priv.focusedAppDelegate.close()
280+ }
281 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
282 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
283 && priv.focusedAppDelegate.restoreFromMaximized();
284@@ -237,7 +294,6 @@
285 PanelState.dropShadow = false;
286 }
287
288-
289 FocusScope {
290 id: appContainer
291 objectName: "appContainer"
292@@ -295,6 +351,7 @@
293 readonly property string appName: model.name
294 property bool visuallyMaximized: false
295 property bool visuallyMinimized: false
296+ readonly property alias currentKeymap: decoratedWindow.currentKeymap
297
298 onFocusChanged: {
299 if (focus && ApplicationManager.focusedApplicationId !== appId) {
300@@ -363,12 +420,12 @@
301 ApplicationManager.focusApplication(appId);
302 }
303
304- function nextKeymap() {
305- decoratedWindow.nextKeymap();
306+ function switchToKeymap(index) {
307+ decoratedWindow.switchToKeymap(index);
308 }
309
310- function previousKeymap() {
311- decoratedWindow.previousKeymap();
312+ function close() {
313+ state = "closing";
314 }
315
316 function playFocusAnimation() {
317@@ -386,6 +443,14 @@
318
319 states: [
320 State {
321+ name: "closing"
322+ PropertyChanges { // freeze the values
323+ target: appDelegate; explicit: true; restoreEntryValues: false;
324+ x: appDelegate.x; y: appDelegate.y
325+ requestedWidth: appDelegate.width; requestedHeight: appDelegate.height
326+ }
327+ },
328+ State {
329 name: "fullscreen"; when: decoratedWindow.fullscreen
330 PropertyChanges {
331 target: appDelegate;
332@@ -400,7 +465,8 @@
333 PropertyChanges {
334 target: appDelegate;
335 visuallyMinimized: false;
336- visuallyMaximized: false
337+ visuallyMaximized: false;
338+ opacity: 1; scale: 1
339 }
340 },
341 State {
342@@ -410,7 +476,8 @@
343 x: root.leftMargin; y: 0;
344 requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appContainer.height;
345 visuallyMinimized: false;
346- visuallyMaximized: true
347+ visuallyMaximized: true;
348+ opacity: 1; scale: 1
349 }
350 },
351 State {
352@@ -437,17 +504,32 @@
353 ]
354 transitions: [
355 Transition {
356+ from: ",minimized"
357 to: "normal"
358 enabled: appDelegate.animationsEnabled
359 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
360- UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
361+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y" }
362+ UbuntuNumberAnimation {
363+ target: appDelegate
364+ property: 'scale'
365+ from: 0.85
366+ to: 1
367+ duration: UbuntuAnimation.SnapDuration
368+ }
369+ UbuntuNumberAnimation {
370+ target: appDelegate
371+ property: 'opacity'
372+ from: 0
373+ to: 1
374+ duration: UbuntuAnimation.SnapDuration
375+ }
376 },
377 Transition {
378 to: "minimized"
379 enabled: appDelegate.animationsEnabled
380 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
381 SequentialAnimation {
382- UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
383+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight" }
384 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
385 ScriptAction {
386 script: {
387@@ -459,11 +541,42 @@
388 }
389 },
390 Transition {
391+ to: "closing"
392+ SequentialAnimation {
393+ PropertyAction { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight" }
394+ ParallelAnimation {
395+ UbuntuNumberAnimation {
396+ target: appDelegate
397+ property: 'scale'
398+ from: 1
399+ to: 0.85
400+ duration: UbuntuAnimation.SnapDuration
401+ easing: UbuntuAnimation.StandardEasingReverse
402+ }
403+ UbuntuNumberAnimation {
404+ target: appDelegate
405+ property: 'opacity'
406+ from: 1
407+ to: 0
408+ duration: UbuntuAnimation.SnapDuration
409+ easing: UbuntuAnimation.StandardEasingReverse
410+ }
411+ }
412+ // hack: make sure the animation has really finished before closing the app
413+ PauseAnimation { duration: UbuntuAnimation.SnapDuration }
414+ ScriptAction {
415+ script: {
416+ ApplicationManager.stopApplication(appId);
417+ }
418+ }
419+ }
420+ },
421+ Transition {
422 to: "*" //maximized and fullscreen
423 enabled: appDelegate.animationsEnabled
424 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
425 SequentialAnimation {
426- UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
427+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight" }
428 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
429 }
430 }
431@@ -500,7 +613,7 @@
432 active: ApplicationManager.focusedApplicationId === model.appId
433 focus: true
434
435- onClose: ApplicationManager.stopApplication(model.appId)
436+ onClose: appDelegate.close()
437 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
438 ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
439 onMinimize: appDelegate.minimize()
440
441=== modified file 'qml/Stages/SurfaceContainer.qml'
442--- qml/Stages/SurfaceContainer.qml 2016-02-17 21:52:09 +0000
443+++ qml/Stages/SurfaceContainer.qml 2016-02-17 21:52:10 +0000
444@@ -48,32 +48,13 @@
445 }
446 }
447
448- function nextKeymap() {
449- var currentIndex = keymaps.indexOf(currentKeymap);
450- var nextIndex = 0;
451-
452- if (currentIndex !== -1 && currentIndex < keymaps.length - 1) {
453- nextIndex = currentIndex + 1;
454- }
455-
456- currentKeymap = keymaps[nextIndex];
457- var keymap = currentKeymap.split("+");
458-
459- surface.setKeymap(keymap[0], keymap[1] || "");
460- }
461-
462- function previousKeymap() {
463- var currentIndex = keymaps.indexOf(currentKeymap);
464- var prevIndex = keymaps.length - 1;
465-
466- if (currentIndex > 0) {
467- prevIndex = currentIndex - 1;
468- }
469-
470- currentKeymap = keymaps[prevIndex];
471- var keymap = currentKeymap.split("+");
472-
473- surface.setKeymap(keymap[0], keymap[1] || "");
474+ function switchToKeymap(index) {
475+ currentKeymap = keymaps[index];
476+ var keymap = currentKeymap.split("+");
477+
478+ if (surface) {
479+ surface.setKeymap(keymap[0], keymap[1] || "");
480+ }
481 }
482
483 InputWatcher {
484
485=== modified file 'qml/Stages/WindowResizeArea.qml'
486--- qml/Stages/WindowResizeArea.qml 2016-02-17 21:52:09 +0000
487+++ qml/Stages/WindowResizeArea.qml 2016-02-17 21:52:10 +0000
488@@ -73,10 +73,10 @@
489 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
490 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
491
492- target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin);
493- target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);
494- target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin)
495- target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)
496+ target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
497+ target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight); });
498+ target.x = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin); });
499+ target.y = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });
500
501 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
502 if (windowState === WindowStateStorage.WindowStateMaximized) {
503@@ -86,7 +86,7 @@
504 }
505
506 Component.onDestruction: {
507- windowStateStorage.saveState(root.windowId, target.state == "maximized" ? WindowStateStorage.WindowStateMaximized : WindowStateStorage.WindowStateNormal)
508+ windowStateStorage.saveState(root.windowId, target.maximized ? WindowStateStorage.WindowStateMaximized : WindowStateStorage.WindowStateNormal)
509 windowStateStorage.saveGeometry(root.windowId, Qt.rect(priv.normalX, priv.normalY, priv.normalWidth, priv.normalHeight))
510 }
511
512
513=== modified file 'tests/qmltests/Stages/tst_DesktopStage.qml'
514--- tests/qmltests/Stages/tst_DesktopStage.qml 2016-02-17 21:52:09 +0000
515+++ tests/qmltests/Stages/tst_DesktopStage.qml 2016-02-17 21:52:10 +0000
516@@ -362,7 +362,7 @@
517 verify(appDelegate);
518 ApplicationManager.focusApplication(appName);
519 keyClick(Qt.Key_F4, Qt.AltModifier); // Alt+F4 shortcut to close
520- verify(ApplicationManager.count == 2); // verify the app is gone
521+ tryCompare(ApplicationManager, "count", 2); // verify the app is gone
522 verify(ApplicationManager.findApplication(appName) === null); // and it's not in running apps
523 }
524
525@@ -409,8 +409,8 @@
526
527 // restore
528 dialerDelegate.restoreFromMaximized();
529- compare(dashApp.session.lastSurface.visible, true);
530- compare(gmailApp.session.lastSurface.visible, true);
531+ tryCompare(dashApp.session.lastSurface, "visible", true);
532+ tryCompare(gmailApp.session.lastSurface, "visible", true);
533 }
534
535 function test_applicationsBecomeVisibleWhenOccludingAppRemoved() {
536
537=== modified file 'tests/qmltests/Stages/tst_WindowResizeArea.qml'
538--- tests/qmltests/Stages/tst_WindowResizeArea.qml 2015-11-30 18:25:47 +0000
539+++ tests/qmltests/Stages/tst_WindowResizeArea.qml 2016-02-17 21:52:10 +0000
540@@ -56,6 +56,7 @@
541 property real widthIncrement: 0
542 property real heightIncrement: 0
543 state: "normal"
544+ readonly property bool maximized: state == "maximized"
545
546 function maximize() {
547 state = "maximized"
548
549=== modified file 'tests/qmltests/tst_Shell.qml'
550--- tests/qmltests/tst_Shell.qml 2016-02-17 21:52:09 +0000
551+++ tests/qmltests/tst_Shell.qml 2016-02-17 21:52:10 +0000
552@@ -2117,6 +2117,7 @@
553 loadShell("desktop");
554 shell.usageScenario = "desktop";
555 waitForRendering(shell);
556+
557 var appContainer = findChild(shell, "appContainer");
558 var launcher = findChild(shell, "launcher");
559

Subscribers

People subscribed via source and target branches