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
Andrea Azzarone Needs Information
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+151949@code.launchpad.net

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

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

Commit message

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)

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 :
review: Approve (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) wrote :

Code looks good. Works here!

review: Approve
Revision history for this message
Andrea Azzarone (azzar1) wrote :

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 :

That branch has now been fixed.

3635. By Sam Spilsbury

Merge prereq branch

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
=== modified file 'src/window.cpp'
--- src/window.cpp 2013-03-11 06:51:20 +0000
+++ src/window.cpp 2013-03-11 06:51:20 +0000
@@ -3331,11 +3331,19 @@
3331 if (lastServerInput.top != serverInput.top)3331 if (lastServerInput.top != serverInput.top)
3332 valueMask |= CWY;3332 valueMask |= CWY;
33333333
3334 if (lastServerInput.right - lastServerInput.left !=3334 /* Calculate frame extents and protect against underflow */
3335 serverInput.right - serverInput.left)3335 const unsigned int lastWrapperWidth = std::max (0, serverFrameGeometry.width () -
3336 (lastServerInput.right + lastServerInput.left));
3337 const unsigned int lastWrapperHeight = std::max (0, serverFrameGeometry.height () -
3338 (lastServerInput.bottom + lastServerInput.top));
3339 const unsigned int wrapperWidth = std::max (0, serverFrameGeometry.width () -
3340 (serverInput.right + serverInput.left));
3341 const unsigned int wrapperHeight = std::max (0, serverFrameGeometry.height () -
3342 (serverInput.bottom + serverInput.top));
3343
3344 if (lastWrapperWidth != wrapperWidth)
3336 valueMask |= CWWidth;3345 valueMask |= CWWidth;
3337 if (lastServerInput.bottom - lastServerInput.top !=3346 if (lastWrapperHeight != wrapperHeight)
3338 serverInput.bottom - serverInput.top)
3339 valueMask |= CWHeight;3347 valueMask |= CWHeight;
33403348
3341 if (valueMask)3349 if (valueMask)
33423350
=== modified file 'tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp'
--- tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp 2013-03-11 06:51:20 +0000
+++ tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp 2013-03-11 06:51:20 +0000
@@ -714,3 +714,39 @@
714 currentWidth,714 currentWidth,
715 currentHeight));715 currentHeight));
716}716}
717
718/* Check that changing the frame extents by one on each side
719 * adjusts the wrapper window appropriately */
720TEST_F (CompizXorgSystemConfigureWindowTest, SetFrameExtentsAdjWrapperWindow)
721{
722 ::Display *dpy = Display ();
723
724 ReparentedWindow w = CreateWindow (dpy);
725
726 int currentX, currentY;
727 unsigned int currentWidth, currentHeight;
728 ASSERT_TRUE (QueryGeometry (dpy,
729 w.frame,
730 currentX,
731 currentY,
732 currentWidth,
733 currentHeight));
734
735 /* Set frame extents and get a response */
736 int left = 1;
737 int right = 1;
738 int top = 1;
739 int bottom = 1;
740
741 SendSetFrameExtentsRequest (w.client, left, right, top, bottom);
742 ASSERT_TRUE (VerifySetFrameExtentsResponse (w.client, left, right, top, bottom));
743
744 /* Wrapper geometry is extents.xy, size.wh */
745 Window root;
746 Window wrapper = GetImmediateParent (dpy, w.client, root);
747 ASSERT_TRUE (VerifyWindowSize (wrapper,
748 left,
749 top,
750 currentWidth,
751 currentHeight));
752}

Subscribers

People subscribed via source and target branches

to all changes: