Merge lp://qastaging/~smspillaz/compiz-core/fix_894633_geometry_saver_class into lp://qastaging/compiz-core/0.9.5
Status: | Superseded |
---|---|
Proposed branch: | lp://qastaging/~smspillaz/compiz-core/fix_894633_geometry_saver_class |
Merge into: | lp://qastaging/compiz-core/0.9.5 |
Prerequisite: | lp://qastaging/~smspillaz/compiz-core/fix-timer-warnings-893998 |
Diff against target: |
2200 lines (+1172/-648) 25 files modified
include/core/rect.h (+9/-0) include/core/window.h (+5/-25) plugins/CMakeLists.txt (+2/-0) plugins/decor/src/decor.cpp (+0/-12) plugins/move/src/move.cpp (+0/-8) plugins/place/src/place.cpp (+4/-33) src/CMakeLists.txt (+9/-3) src/event.cpp (+25/-16) src/privatewindow.h (+1/-2) src/rect.cpp (+2/-1) src/screen.cpp (+7/-5) src/window.cpp (+401/-379) src/window/CMakeLists.txt (+2/-0) src/window/geometry-saver/CMakeLists.txt (+68/-0) src/window/geometry-saver/include/core/windowgeometrysaver.h (+94/-0) src/window/geometry-saver/src/geometrysaver.cpp (+75/-0) src/window/geometry-saver/tests/test-window-geometry-saver.cpp (+26/-0) src/window/geometry-saver/tests/test-window-geometry-saver.h (+39/-0) src/window/geometry-saver/tests/window-geometry-saver/src/test-window-geometry-saver.cpp (+111/-0) src/window/geometry/CMakeLists.txt (+65/-0) src/window/geometry/include/core/windowgeometry.h (+72/-0) src/window/geometry/src/windowgeometry.cpp (+1/-164) src/window/geometry/tests/test-window-geometry.cpp (+26/-0) src/window/geometry/tests/test-window-geometry.h (+39/-0) src/window/geometry/tests/window-geometry/src/test-window-geometry.cpp (+89/-0) |
To merge this branch: | bzr merge lp://qastaging/~smspillaz/compiz-core/fix_894633_geometry_saver_class |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Voß | Needs Fixing | ||
Thomi Richards (community) | Approve | ||
Review via email: mp+84056@code.qastaging.launchpad.net |
This proposal has been superseded by a proposal from 2012-01-13.
Description of the change
This branch adds a new class GeometrySaver which handles selective geometry save / restore.
This was previously done by using the old XWindowChanges structure and change masks, but since we want to break the dependency with X in order to do things like unit testing, we need to use our own class.
GeometrySaver::push () will save some geometry specified by the change mask
GeometrySaver::pop () will write to the geoemtry the saved geometry specified by the change mask and returns the change mask of the actual restored geometry.
GeometrySaver:
GeoemtrySaver::get () will allow you to inspect the state of the GeoemtrySaver object without actually clearing the mask bits.
CompWindow:
Geometry related functions in CompWindow which were in windowgeometry.cpp were moved to window.cpp
Code snippits which might look like:
if (!(w->saveMask () & CWX))
{
w->saveWc ().x = foo;
w->saveMask () |= CWX;
}
were changed to
compiz:
saver.push (foo, CHANGE_X);
Added unit tests for compiz:
Next pipe: lp:~smspillaz/compiz-core/fix_894685
Unmerged revisions
- 2926. By Sam Spilsbury
-
Remove unnecessary file in build
- 2925. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2924. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2923. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2922. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2921. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2920. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2919. By Sam Spilsbury
-
Remove dead code
- 2918. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2917. By Sam Spilsbury
-
Fix typo
Hi,
A few notes:
First, I'm not qualified to ensure that your changes actually do what they're supposed to - I know next to nothing about Compiz, and, to be honest, the sight of the compiz code fills me with trepidation. What I *can* do is check for stylistic consistency, and point out any places in the public API where I feel a comment or two would help. My point is that we really need to get someone else who understands compiz to look at these branches.
window.h:
* ln 219 - comments above preprocessor macros need to be Doxygen-style comments, like the others on the lines above.
* In your Geometry class, the border() and setBorder() methods should be declared next to each other.
* The unit tests for this class need to be landed as part of this merge, not later in the pipeline.
As a general rule, #defining things makes me nervous, but it's obviously the "compiz way", so you'd better stick with the established coding standards. I'm nervous because #define ignores all scoping rules.
composite.h:
* ln 318 - need comment.
* is it called positionOffset or paintOffset? The comment and the method name should be the same, whichever you pick.
privates.h:
* ln 125 - need comment.
move.cpp:
* ln 451 - don't comment out code - delete it. This looks especially odd when compared to the previous revision.
privatewindow.h:
* ln 82 - it's not obvious to me what the difference is between configureXWindow and reconfigureXWindow - perhaps a comment explaining what the difference is?
That's it!