Merge lp://qastaging/~lukas-kde/unity8/fix-restore-position into lp://qastaging/unity8

Proposed by Lukáš Tinkl
Status: Superseded
Proposed branch: lp://qastaging/~lukas-kde/unity8/fix-restore-position
Merge into: lp://qastaging/unity8
Prerequisite: lp://qastaging/~ci-train-bot/unity8/unity8-ubuntu-zesty-2481
Diff against target: 51 lines (+10/-7)
2 files modified
qml/Stage/MoveHandler.qml (+0/-5)
qml/Stage/Stage.qml (+10/-2)
To merge this branch: bzr merge lp://qastaging/~lukas-kde/unity8/fix-restore-position
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Daniel d'Andrada (community) Needs Information
Review via email: mp+319109@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2017-03-08.

Commit message

Fix the restored-to position with Miral due to the state changes being async

Description of the change

Fix the restored-to position with Miral due to the state changes being async

Instead of relying on appDelegate direct state changes, we also check for the visibility of the fake preview rectangle and save the restoredX/Y when it's not visible.

Also change the no longer working "grabbing" cursor name to something that Mir understands

Fixes lp:1669819

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

FAILED: Continuous integration, rev:2842
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3286/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4325
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2582
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2582
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4353
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4187
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4187/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4187
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4187/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4187
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4187/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4187
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4187/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4187
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4187/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4187
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4187/artifact/output/*zip*/output.zip

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

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

FAILED: Continuous integration, rev:2843
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3289/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4328
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2584
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2584
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4356
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4190
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4190/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4190
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4190/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4190
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4190/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4190
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4190/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4190
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4190/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4190
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4190/artifact/output/*zip*/output.zip

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

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

FAILED: Continuous integration, rev:2844
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3291/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4330
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2586
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2586
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4358
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4192
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4192/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4192
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4192/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4192
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4192/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4192
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4192/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4192
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4192/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4192
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4192/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
2840. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

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

PASSED: Continuous integration, rev:2843
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3295/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4335
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2591
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2591
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4363
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4197
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4197/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4197
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4197/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4197
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4197/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4197
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4197/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4197
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4197/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4197
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4197/artifact/output/*zip*/output.zip

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

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

$ bzr branch lp:unity8 foo && cd foo
$ bzr merge lp:~ci-train-bot/unity8/unity8-ubuntu-zesty-2481 && bzr commit -m"prereq"
$ bzr merge lp:~lukas-kde/unity8/fix-restore-position
Warning: criss-cross merge encountered. See bzr help criss-cross.
Not attempting to fix packaging branch ancestry, missing pristine tar data for version 8.15+17.04.20170303.1.
 M debian/changelog
 M po/unity8.pot
 M qml/Stage/MoveHandler.qml
 M qml/Stage/Stage.qml
 M tests/qmltests/Stage/tst_DesktopStage.qml
Text conflict in po/unity8.pot
1 conflicts encountered.

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

Better not have a moving target as a prerequisite

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

" Also change the no longer working "grabbing" cursor name to something that Mir understands"

It's not Mir. It's the CursorImageProvider in the unity8 Cursor plugin. Please copy-paste the description into the commit message. I don't know why you think commit messages don't deserve a detailed explanation.

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

I'm failing to understand why waiting until the fake rectangle is not visible anymore and calling updateRestored() at a differnt moment relates to the "state changes being async". This is all very confusing.

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

And mixing it up with a unrelated fix doesn't help.

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

What bug are you trying to fix with this change in cursor name?

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

I think that what you need is to improve the fallback names in CursorImageProvider so that if it doesn't find a "grabbing" it looks for a "closedhand". Will solve the situation where unity8 is not using dmz theme but some other one that provides a "closedhand" instead of a "grabbing".

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

please split them into separate MPs

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

Instead of

{ appDelegate.updateRestoredGeometry(); fakeRectangle.commit(); }

function updateRestoredGeometry() {
    if ((appDelegate.state == "normal" || appDelegate.state == "restored") && !fakeRectangle.visible) {
        // save the x/y to restore to
        restoredX = appDelegate.x;
        restoredY = appDelegate.y;
    }
}

Would be cleaner to have:

{
    if (fakeRectangle.visible) {
        fakeRectangle.commit();
    } else {
        updateRestoredGeometry();
    }
}

function updateRestoredGeometry() {
    if ((appDelegate.state == "normal" || appDelegate.state == "restored")) {
        // save the x/y to restore to
        restoredX = appDelegate.x;
        restoredY = appDelegate.y;
    }
}

Or do you also need to call fakeRectangle.commit() even when the fakeRectangle is not in action?

2841. By Lukáš Tinkl

address review comments

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

drop dead code

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches