Merge lp://staging/~smspillaz/compiz-core/fix_894688 into lp://staging/compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp://staging/~smspillaz/compiz-core/fix_894688
Merge into: lp://staging/compiz-core/0.9.5
Prerequisite: lp://staging/~smspillaz/compiz-core/fix_894685
Diff against target: 2208 lines (+1205/-424)
32 files modified
include/core/point.h (+0/-110)
include/core/window.h (+2/-10)
plugins/CMakeLists.txt (+2/-0)
plugins/composite/src/privates.h (+3/-0)
plugins/composite/src/window.cpp (+101/-58)
plugins/decor/src/decor.cpp (+154/-119)
plugins/decor/src/decor.h (+6/-0)
plugins/opengl/src/privates.h (+1/-0)
plugins/opengl/src/window.cpp (+18/-0)
plugins/wobbly/src/wobbly.cpp (+4/-2)
src/CMakeLists.txt (+10/-3)
src/point.cpp (+0/-100)
src/point/CMakeLists.txt (+67/-0)
src/point/include/core/point.h (+110/-0)
src/point/src/point.cpp (+100/-0)
src/point/tests/CMakeLists.txt (+18/-0)
src/point/tests/point/src/test-point.cpp (+71/-0)
src/point/tests/test-point.cpp (+34/-0)
src/point/tests/test-point.h (+43/-0)
src/window.cpp (+24/-21)
src/window/CMakeLists.txt (+1/-0)
src/window/extents/CMakeLists.txt (+67/-0)
src/window/extents/include/core/windowextents.h (+63/-0)
src/window/extents/src/windowextents.cpp (+81/-0)
src/window/extents/tests/CMakeLists.txt (+18/-0)
src/window/extents/tests/shift/src/test-window-extents-shift.cpp (+91/-0)
src/window/extents/tests/test-window-extents.cpp (+34/-0)
src/window/extents/tests/test-window-extents.h (+42/-0)
src/window/geometry-saver/CMakeLists.txt (+1/-0)
src/window/geometry-saver/tests/CMakeLists.txt (+18/-0)
src/window/geometry/CMakeLists.txt (+3/-1)
src/window/geometry/tests/CMakeLists.txt (+18/-0)
To merge this branch: bzr merge lp://staging/~smspillaz/compiz-core/fix_894688
Reviewer Review Type Date Requested Status
Thomas Voß Approve
Tim Penhey (community) Needs Fixing
Thomi Richards (community) Approve
Review via email: mp+84058@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2012-01-13.

Description of the change

Make the decor plugin work with paint offsets.

Moved getting the shift distance due to window gravity into a utility function in core and made it so that whenever a plugin tries to change the frame extents of a window, this will always update the saved co-ordinates of maximized windows so that they restore to the correct position if their frame extents change while they are maximized (eg, the unity case)

CompositeWindow::damageGeometrySets will create a region containing an old an new geometry.

Fixed display matrices not being updated on override redirect windows - ::position never gets called for them, we must do it when the server updates the position.

Moved the geometry and geometry saver tests into a separate subdir

Next pipe: lp:~smspillaz/compiz-core/fix_891591

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Make the decor plugin work with paint offsets.

Moved getting the shift distance due to window gravity into a utility function in core and made it so that whenever a plugin tries to change the frame extents of a window, this will always update the saved co-ordinates of maximized windows so that they restore to the correct position if their frame extents change while they are maximized (eg, the unity case)

2903. By Sam Spilsbury

Merged compiz-core.fix_894685

2904. By Sam Spilsbury

Fix typo

2905. By Sam Spilsbury

Added tests for compiz::window::extents::Extents

2906. By Sam Spilsbury

Don't depend on core.h for CompRect

2907. By Sam Spilsbury

Added missing files

2908. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2909. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2910. By Sam Spilsbury

Merge

2911. By Sam Spilsbury

Fixed typo in the test-window-geometry test that was causing it to fail

2912. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2913. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2914. By Sam Spilsbury

Merge compiz-core.fix_894633

2915. By Sam Spilsbury

Fix whitespace

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

ln 130 - is the change from 'geometry' to 'serverGeometry' intentional?

ln 214 - Why not write this as:

cScreen->damageRegion(oldGeometry + newGeometry);

ln 980 - this obviously only works as long as both structures have exactly
 the same contents and are laid out in exactly the same manner. I assume you have checked that this is the case?

As far as I can tell, this is looking good, with the few points mentioned above.

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

> ln 130 - is the change from 'geometry' to 'serverGeometry' intentional?
>

Yes, the serverGeometry is what is used to paint the window while we wait on the server to give us the new geometry for the window (which is always guarunteed to be the geometry last sent (eg serverGeometry) as we are the window manager).

> ln 214 - Why not write this as:
>
> cScreen->damageRegion(oldGeometry + newGeometry);

fixed

>
> ln 980 - this obviously only works as long as both structures have exactly
> the same contents and are laid out in exactly the same manner. I assume you
> have checked that this is the case?

Yes, they are both CompWindowExtents. Perhaps I should make it so that you can't derive from that class though, I might ask Tim about that.

>
>
> As far as I can tell, this is looking good, with the few points mentioned
> above.

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

>> ln 214 - Why not write this as:
>>
>> cScreen->damageRegion(oldGeometry + newGeometry);

> fixed

Actually, there's no operator+ defined in CompRect which returns a region, and I'm not really sure if I want to introduce a cyclic dependency like that. So I think the explicit conversion is better off for now.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

OK, I'm happy.

review: Approve
2916. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2917. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2918. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2919. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

Revision history for this message
Tim Penhey (thumper) wrote :

> (memcmp (&priv->serverInput, i, sizeof (CompWindowExtents)) ||
> memcmp (&priv->border, b, sizeof (CompWindowExtents)))

Please write an operator == and not use memcmp. Even for simple structs.
Then implement operator != in terms of operator ==.

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The main reason (other than stylistic and religious) for not using memcmp on structs is because structs are often not perfectly aligned and so contain padding bytes. The padding bytes are uninitialized, unpredictable and inaccessible unless you also guarantee each struct has first been memset(&s,0,sizeof(s)).

In general, memcmp is highly optimized for the architecture and is in fact faster than a bespoke operator. However you can't use memcmp with structs unless you guarantee they're always fully initialized with memset to the full sizeof(yourstruct).

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

On Thu, 15 Dec 2011, Daniel van Vugt wrote:

> The main reason (other than stylistic and religious) for not using memcmp on structs is because structs are often not perfectly aligned and so contain padding bytes. The padding bytes are uninitialized, unpredictable and inaccessible unless you also guarantee each struct has first been memset(&s,0,sizeof(s)).
>
> In general, memcmp is highly optimized for the architecture and is in fact faster than a bespoke operator. However you can't use memcmp with structs unless you guarantee they're always fully initialized with memset to the full sizeof(yourstruct).

Thanks Daniel - I didn't know that, so I'll keep it in mind (and probably
just implement operator==)

> --
> https://code.launchpad.net/~smspillaz/compiz-core/fix_894688/+merge/84058
> You are the owner of lp:~smspillaz/compiz-core/fix_894688.
>

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
2920. By Sam Spilsbury

Merged previous pipe

2921. By Sam Spilsbury

Use operator== in windowextents

2922. By Sam Spilsbury

Merge

2923. By Sam Spilsbury

Merge

2924. By Sam Spilsbury

Moved compiz::window::extents::Extents and CompPoint to the new testing structure and Google Test

2925. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2926. By Sam Spilsbury

Expose extents and point in the plugins list

2927. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2928. By Sam Spilsbury

Merge

2929. By Sam Spilsbury

Fix typo

Revision history for this message
Thomas Voß (thomas-voss) wrote :

Looks good to me.

review: Approve
2930. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2931. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2932. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2933. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2934. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2935. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2936. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2937. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2938. By Sam Spilsbury

Merge

Unmerged revisions

2938. By Sam Spilsbury

Merge

2937. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2936. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2935. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2934. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2933. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2932. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2931. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2930. By Sam Spilsbury

Merged compiz-core.fix_894685 into compiz-core.fix_894688.

2929. By Sam Spilsbury

Fix typo

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