Merge lp://staging/~smspillaz/compiz-core/compiz-core.fix_894633_geometry_saver_class into lp://staging/compiz-core/0.9.5
Status: | Rejected |
---|---|
Rejected by: | Sam Spilsbury |
Proposed branch: | lp://staging/~smspillaz/compiz-core/compiz-core.fix_894633_geometry_saver_class |
Merge into: | lp://staging/compiz-core/0.9.5 |
Prerequisite: | lp://staging/~smspillaz/compiz-core/fix-timer-warnings-893998 |
Diff against target: |
2174 lines (+1139/-624) 24 files modified
include/core/window.h (+4/-34) plugins/CMakeLists.txt (+2/-0) plugins/decor/src/decor.cpp (+1/-25) plugins/move/src/move.cpp (+0/-10) plugins/place/src/place.cpp (+4/-33) src/CMakeLists.txt (+12/-16) src/event.cpp (+25/-16) src/privatewindow.h (+1/-2) src/rect.cpp (+2/-0) src/screen.cpp (+7/-5) src/window.cpp (+373/-320) 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 (+73/-0) src/window/geometry/src/windowgeometry.cpp (+1/-163) 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://staging/~smspillaz/compiz-core/compiz-core.fix_894633_geometry_saver_class |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Voß | Pending | ||
Thomi Richards | Pending | ||
Review via email: mp+88489@code.staging.launchpad.net |
This proposal supersedes a proposal from 2011-12-01.
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
- 2941. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2940. By Sam Spilsbury
-
Fix more warnings
- 2939. By Sam Spilsbury
-
Fix warning
- 2938. By Sam Spilsbury
-
Merge
- 2937. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2936. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2935. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2934. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2933. By Sam Spilsbury
-
Merged fix-timer-
warnings- 893998 into compiz- core.fix_ 894633_ geometry_ saver_class. - 2932. By Sam Spilsbury
-
Merge
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!