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

Proposed by Steve Langasek
Status: Superseded
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
MC Return Needs Fixing
Sam Spilsbury Needs Resubmitting
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+157534@code.qastaging.launchpad.net

This proposal has been superseded by 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 :

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 :

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 :

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 :

(Or at least 3646 from this branch)

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

\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
3646. By Steve Langasek

Refactor test case to make the code more readable; split into multiple tests
for better legibility in the case of test failures; lays the groundwork for
added tests for bug #763148.

3647. By Steve Langasek

Drop the 'curVpOffsetX/Y' obfuscation, which is only ever used in equations
where it cancels out!

3648. By Steve Langasek

Add more tests for window placement on resizing

3649. By Steve Langasek

Make sure windows remain on the same viewport they started out on when
the screen resolution changes. LP: #763148.

3650. By Steve Langasek

plugins/place/src/place.cpp: in some cases, we see configure events sent
for the root window twice in a row before all windows have had a chance
to handle the first, which corrupts the old state. So ignore root
configure events that don't change the size.

3651. By Steve Langasek

further reduce repetition in the test code, per Sam's feedback

Revision history for this message
Steve Langasek (vorlon) wrote :

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>

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