Merge lp:~compiz-team/compiz/raring.fix_1140505 into lp:compiz/raring

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp:~compiz-team/compiz/raring.fix_1140505
Merge into: lp:compiz/raring
Prerequisite: lp:~compiz-team/compiz/raring.fix_1138517
Diff against target: 71 lines (+48/-4)
2 files modified
src/window.cpp (+12/-4)
tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp (+36/-0)
To merge this branch: bzr merge lp:~compiz-team/compiz/raring.fix_1140505
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Andrea Azzarone Pending
Review via email: mp+152621@code.launchpad.net

This proposal supersedes a proposal from 2013-03-06.

This proposal has been superseded by a proposal from 2013-03-12.

Description of the change

  Use the actual change in window size to determine if we need to change
  the frame window size, don't just use the difference in frame extents
  to determine that.

  (LP: #1140505)

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
review: Approve (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) wrote : Posted in a previous version of this proposal

Code looks good. Works here!

review: Approve
Revision history for this message
Andrea Azzarone (azzar1) wrote : Posted in a previous version of this proposal

The branch for lp:compiz does not need lp:~compiz-team/compiz/raring.fix_1138517. Why?

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

That branch has now been fixed.

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

New changes backported, haven't got time to test them yet. Wait for CI

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:3635
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/~compiz-team/compiz/raring.fix_1140505/+merge/152621/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/compiz-ci/109/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-gles-ci/./build=pbuilder,distribution=raring,flavor=amd64/146/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-pbuilder/./build=pbuilder,distribution=raring,flavor=amd64/498/console

Click here to trigger a rebuild:
http://jenkins.qa.ubuntu.com/job/compiz-ci/109//rebuild/?

review: Needs Fixing (continuous-integration)

Unmerged revisions

3635. By Sam Spilsbury

Merge prereq branch

3634. By Sam Spilsbury

Use the actual change in window size to determine if we need to change
the frame window size, don't just use the difference in frame extents
to determine that.

(LP: #1140505)

3633. By Sam Spilsbury

Unmerge lp:~sil2100/compiz/raring_revert_3616

3632. By Sam Spilsbury

Merge lp:~sil2100/compiz/raring_revert_3616

3631. By Sam Spilsbury

Don't set lastFrameExtents unless the window geometry actually changed - as
that variable only exists to track changes in the actual geometry of
the window and not the apparant frame extents.

Added tests to verify that behaviour.

(LP: #1138517)

3630. By PS Jenkins bot

Releasing 1:0.9.9~daily13.03.01-0ubuntu1 to ubuntu.

Approved by PS Jenkins bot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/window.cpp'
2--- src/window.cpp 2013-03-11 06:50:27 +0000
3+++ src/window.cpp 2013-03-11 06:50:27 +0000
4@@ -3331,11 +3331,19 @@
5 if (lastServerInput.top != serverInput.top)
6 valueMask |= CWY;
7
8- if (lastServerInput.right - lastServerInput.left !=
9- serverInput.right - serverInput.left)
10+ /* Calculate frame extents and protect against underflow */
11+ const unsigned int lastWrapperWidth = std::max (0, serverFrameGeometry.width () -
12+ (lastServerInput.right + lastServerInput.left));
13+ const unsigned int lastWrapperHeight = std::max (0, serverFrameGeometry.height () -
14+ (lastServerInput.bottom + lastServerInput.top));
15+ const unsigned int wrapperWidth = std::max (0, serverFrameGeometry.width () -
16+ (serverInput.right + serverInput.left));
17+ const unsigned int wrapperHeight = std::max (0, serverFrameGeometry.height () -
18+ (serverInput.bottom + serverInput.top));
19+
20+ if (lastWrapperWidth != wrapperWidth)
21 valueMask |= CWWidth;
22- if (lastServerInput.bottom - lastServerInput.top !=
23- serverInput.bottom - serverInput.top)
24+ if (lastWrapperHeight != wrapperHeight)
25 valueMask |= CWHeight;
26
27 if (valueMask)
28
29=== modified file 'tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp'
30--- tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp 2013-03-11 06:50:27 +0000
31+++ tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp 2013-03-11 06:50:27 +0000
32@@ -714,3 +714,39 @@
33 currentWidth,
34 currentHeight));
35 }
36+
37+/* Check that changing the frame extents by one on each side
38+ * adjusts the wrapper window appropriately */
39+TEST_F (CompizXorgSystemConfigureWindowTest, SetFrameExtentsAdjWrapperWindow)
40+{
41+ ::Display *dpy = Display ();
42+
43+ ReparentedWindow w = CreateWindow (dpy);
44+
45+ int currentX, currentY;
46+ unsigned int currentWidth, currentHeight;
47+ ASSERT_TRUE (QueryGeometry (dpy,
48+ w.frame,
49+ currentX,
50+ currentY,
51+ currentWidth,
52+ currentHeight));
53+
54+ /* Set frame extents and get a response */
55+ int left = 1;
56+ int right = 1;
57+ int top = 1;
58+ int bottom = 1;
59+
60+ SendSetFrameExtentsRequest (w.client, left, right, top, bottom);
61+ ASSERT_TRUE (VerifySetFrameExtentsResponse (w.client, left, right, top, bottom));
62+
63+ /* Wrapper geometry is extents.xy, size.wh */
64+ Window root;
65+ Window wrapper = GetImmediateParent (dpy, w.client, root);
66+ ASSERT_TRUE (VerifyWindowSize (wrapper,
67+ left,
68+ top,
69+ currentWidth,
70+ currentHeight));
71+}

Subscribers

People subscribed via source and target branches

to all changes: