Merge lp://qastaging/~alan-griffiths/compiz-core/private_screen-EventManager1 into lp://qastaging/compiz-core

Proposed by Alan Griffiths
Status: Merged
Merged at revision: 3054
Proposed branch: lp://qastaging/~alan-griffiths/compiz-core/private_screen-EventManager1
Merge into: lp://qastaging/compiz-core
Diff against target: 712 lines (+210/-125)
6 files modified
include/core/screen.h (+1/-0)
src/event.cpp (+11/-8)
src/privateiosource.h (+1/-1)
src/privatescreen.h (+55/-35)
src/screen.cpp (+141/-80)
src/window.cpp (+1/-1)
To merge this branch: bzr merge lp://qastaging/~alan-griffiths/compiz-core/private_screen-EventManager1
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Review via email: mp+96590@code.qastaging.launchpad.net

Description of the change

Decouple EventManager from rest of what was PrivateScreen

To post a comment you must log in.
3059. By Alan Griffiths

Revoke unnecessary friendship

3060. By Alan Griffiths

TODO note abut daft data structure

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

Looks OK, works OK.

Though think it would be more elegant and better for maintenance to wrap functions in a single:
    namespace compiz::private_screen { ... }
instead of prefixing them with "cps::".

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

Or rather wrap them in:
    namespace compiz { namespace private_screen {
    ...
    }}

I also think everything in compiz_core should just be in a single namespace "compiz" unless it's built into a separate static lib.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

On 13/03/12 03:41, Daniel van Vugt wrote:
> Or rather wrap them in: namespace compiz { namespace private_screen
> { ... }}

This is something on which reasonable people may differ. I prefer the
"cps::" approach because of the following use case:

// header
namespace example {
void center();
}

// implementation-v1
void example::centre() {}
// Compiler error

// implementation-v2
namespace example {
void example::centre() {}
// No compiler error - just not what's intended
}

>
> I also think everything in compiz_core should just be in a single
> namespace "compiz" unless it's built into a separate static lib.

I think the /public/ interface should be in namespace compiz, and that
the implementation details should be in a nested namespace
compiz::detail (say). But that would introduce yet another style.

--
Alan Griffiths +44 (0)798 9938 758
Octopull Ltd http://www.octopull.co.uk/

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