Merge lp://qastaging/~vorlon/compiz/lp.763148 into lp://qastaging/compiz/0.9.10

Proposed by Steve Langasek
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3651
Merged at revision: 3646
Proposed branch: lp://qastaging/~vorlon/compiz/lp.763148
Merge into: lp://qastaging/compiz/0.9.10
Diff against target: 466 lines (+204/-126)
3 files modified
plugins/place/src/place.cpp (+3/-1)
plugins/place/src/screen-size-change/src/screen-size-change.cpp (+10/-37)
plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp (+191/-88)
To merge this branch: bzr merge lp://qastaging/~vorlon/compiz/lp.763148
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
MC Return Abstain
Sam Spilsbury Approve
Review via email: mp+157537@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2013-04-07.

Commit message

Fix for bug #763148 (with added test cases): when the desktop is resized,
windows should stay on their original workspace.

Description of the change

Fix for bug #763148 (with added test cases): when the desktop is resized,
windows should stay on their original workspace.

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:3647
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~vorlon/compiz/lp.763148/+merge/157534/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/compiz-ci/122/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/compiz-gles-ci/./build=pbuilder,distribution=raring,flavor=amd64/159/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/compiz-pbuilder/./build=pbuilder,distribution=raring,flavor=amd64/511/console

Click here to trigger a rebuild:
http://s-jenkins:8080/job/compiz-ci/122/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Hey, thanks so much for doing this, and also adding test cases.

A quick note: I'm marking this as "resubmit" as there are merge conflicts. It appears that you've taken lp:compiz/raring, made changes there, and then submitted it for merging against lp:compiz . The two branches differ slightly (distro is cherry-picking fixes from lp:compiz to lp:compiz/0.9.9). Also - changes to debian/changelog are unnecessary and probably not wanted either. The automerger will automatically update the debian changelog, and updating it manually will probably confuse it.

As for some code review, here are some suggestions I have.

1. Thanks for refactoring some of the common setup code. I think the method could be renamed to assignStrutsWorkAreaAndGeoemtry
2. In TestScreenSizeChangePreviousViewport:

506 + /* Deal with the case where the position is negative, which means
507 + * it's actually wrapped around to the rightmost viewport
508 + */
509 + g.setPos (CompPoint (-300, 200));
510 + ms.setGeometry (g);
511 +
512 + expected = compiz::window::Geometry (-300, 200, 300, 400, 0);

It appears that the relevant assertion here is that the window will have the same geometry if wrapped to the rightmost viewport when the rightmost viewport is unplugged. In that case, it might be better to just set "expected" to "g", as they are both the same.

Everything else seems mostly fine to me.

Doing this review reminded me that both the tests and adjustForSize need some serious refactoring, because even in their simplified versions, there is way too much going on in both of them. I'm not going to block this review on it, however, because:
 a) They were monsters of my own creation, and I should have the responsibility to deal with them.
 b) I was going to suggest doing the refactoring in this review, but decided against it because articulating what needed to be done was so detailed and complicated that it would just cause miscommunication and lots of unrelated change.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

What you'll need to do from here is:

1. Branch lp:compiz
2. Cherry pick revisions 3643..3646 from your old branch into that one
3. Submit that branch.

review: Needs Resubmitting
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

(Or at least 3646 from this branch)

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

\o/
Stopping windows from jumping around weirdly should be numbero uno priority for us...
But I do not like this diff either...

review: Needs Fixing
Revision history for this message
Steve Langasek (vorlon) wrote : Posted in a previous version of this proposal

On Sun, Apr 07, 2013 at 05:59:18AM -0000, Sam Spilsbury wrote:
> Hey, thanks so much for doing this, and also adding test cases.

> A quick note: I'm marking this as "resubmit" as there are merge conflicts.
> It appears that you've taken lp:compiz/raring, made changes there, and
> then submitted it for merging against lp:compiz

Yep, was betrayed by the default behavior of bzr lp-propose-merge here.
I've rebased now and resubmitted:

  https://code.launchpad.net/~vorlon/compiz/lp.763148/+merge/157537

> As for some code review, here are some suggestions I have.

> 1. Thanks for refactoring some of the common setup code. I think the
> method could be renamed to assignStrutsWorkAreaAndGeoemtry

I don't find that a very clear description of what the method does, since
it's also what calls adjustForSize(). But maybe I'm misunderstanding?

> 2. In TestScreenSizeChangePreviousViewport:

> 506 + /* Deal with the case where the position is negative, which means
> 507 + * it's actually wrapped around to the rightmost viewport
> 508 + */
> 509 + g.setPos (CompPoint (-300, 200));
> 510 + ms.setGeometry (g);
> 511 +
> 512 + expected = compiz::window::Geometry (-300, 200, 300, 400, 0);

> It appears that the relevant assertion here is that the window will have
> the same geometry if wrapped to the rightmost viewport when the rightmost
> viewport is unplugged. In that case, it might be better to just set
> "expected" to "g", as they are both the same.

Right, changed - thanks.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

This looks fine to me. I plan to do some rather large-ish refactoring on this section of the code, so lets not make the perfect the enemy of the good here.

review: Approve
Revision history for this message
MC Return (mc-return) wrote :

/offtopic on
During recent intensive testing I found another jumping window bug:
bug 1165695

Anyone an idea about the origin (in the code) of that one ?
/offtopic off

Steve, I could not test your branch that fast, but my "Approve" does
not count anyway ;)

review: Abstain
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Steve: the destination branch is now 0.9.9 for raring (btw, I think we should update Vcs-Bzr). Mind havind a look for making a MP there as well?

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