Merge lp://qastaging/~alan-griffiths/compiz-core/refactor-Display-from-PrivateScreen into lp://qastaging/compiz-core

Proposed by Alan Griffiths
Status: Rejected
Rejected by: Alan Griffiths
Proposed branch: lp://qastaging/~alan-griffiths/compiz-core/refactor-Display-from-PrivateScreen
Merge into: lp://qastaging/compiz-core
Diff against target: 7093 lines (+3393/-3281)
12 files modified
include/core/screen.h (+3/-0)
include/core/window.h (+1/-0)
src/CMakeLists.txt (+1/-0)
src/event.cpp (+0/-28)
src/main.cpp (+1/-1)
src/plugin.cpp (+1/-1)
src/privatescreen.cpp (+3045/-0)
src/privatescreen.h (+251/-275)
src/privatescreen/tests/test-privatescreen.cpp (+34/-37)
src/region/CMakeLists.txt (+48/-0)
src/screen.cpp (+8/-2907)
src/window.cpp (+0/-32)
To merge this branch: bzr merge lp://qastaging/~alan-griffiths/compiz-core/refactor-Display-from-PrivateScreen
Reviewer Review Type Date Requested Status
Alan Griffiths Disapprove
Review via email: mp+93607@code.qastaging.launchpad.net

Description of the change

Split out the bits of PrivateScreen that do/don't depend on having a Display.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I suggest we defer this one for a while. Especially since the last privatescreen tidy up caused a few regressions.

At the very least, we'll need to ensure that compiz-plugins-* and libcompizconfig still work before approving this.

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

Also, three Screen classes in core is a bit troublesome. We should be looking at how to get back to only two. Maybe merge PrivateScreen+CompScreenImpl.

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

> I suggest we defer this one for a while. Especially since the last
> privatescreen tidy up caused a few regressions.
>
> At the very least, we'll need to ensure that compiz-plugins-* and
> libcompizconfig still work before approving this.

I'm conscious of problems caused by the previous tidy up and this time have contented myself with segregating code into more coherent areas.

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

> Also, three Screen classes in core is a bit troublesome. We should be looking
> at how to get back to only two. Maybe merge PrivateScreen+CompScreenImpl.

I think the problem is quite otherwise.

The code spread across CompScreen/Impl/private lacks coherency (it performs a number of unrelated functions). If these were split out into smaller, coherent, classes these would be easier to validate and interactions easier to predict.

Where I'm aiming for is a CompScreen interface and an implementation that contains classes to manage individual functional areas. This commit is a step in that direction.

The reason for keeping PrivateScreen at present is for API compatibility - for existing code that does access ::screen->priv->XXXX - I restrained myself from dumping it all into CompScreenImpl.

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

> > Also, three Screen classes in core is a bit troublesome. We should be
> looking
> > at how to get back to only two. Maybe merge PrivateScreen+CompScreenImpl.
>
> I think the problem is quite otherwise.
>
> The code spread across CompScreen/Impl/private lacks coherency (it performs a
> number of unrelated functions). If these were split out into smaller,
> coherent, classes these would be easier to validate and interactions easier to
> predict.
>
> Where I'm aiming for is a CompScreen interface and an implementation that
> contains classes to manage individual functional areas. This commit is a step
> in that direction.

+1

I'd like for us all to keep this design goal in mind. CompWindow and CompScreen are monstrosities - even if we can specify a number of different interfaces they provide, this is far better for testing and refactoring then coding to CompScreen and friends.

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

3746 + // >>>>>>>>>> WEIRD STUFF >>>>>>>>>>
3747 + // TODO - unimplemented and unused?
3748 + void updatePassiveGrabs ();

It has been replaced by updatePassiveKeyGrabs and can be removed

3749 + // TODO - unimplemented and unused?
3750 + bool createFailed ();

We should replace this with exceptions.

3751 + // TODO - unused?
3752 + std::map<CompString, CompPrivate> valueMap;

99% sure that ValueHolder replaced this one (although we need to convert ValueHolder from being a singleton to being an interface)(

3753 + // TODO - unused?
3754 + xcb_connection_t *connection;

Yep, it can go too (although I really would love to use xcb at some point in the future)

3755 + // TODO - unused?
3756 + XRectangle lastViewport;

Can also go

3757 + // <<<<<<<<<< WEIRD STUFF <<<<<<<<<<
3758 +

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

> 3746 + // >>>>>>>>>> WEIRD STUFF >>>>>>>>>>
> 3747 + // TODO - unimplemented and unused?
> 3748 + void updatePassiveGrabs ();
>
> It has been replaced by updatePassiveKeyGrabs and can be removed
>
> 3749 + // TODO - unimplemented and unused?
> 3750 + bool createFailed ();
>
> We should replace this with exceptions.
>
> 3751 + // TODO - unused?
> 3752 + std::map<CompString, CompPrivate> valueMap;
>
> 99% sure that ValueHolder replaced this one (although we need to convert
> ValueHolder from being a singleton to being an interface)(
>
> 3753 + // TODO - unused?
> 3754 + xcb_connection_t *connection;
>
> Yep, it can go too (although I really would love to use xcb at some point in
> the future)
>
> 3755 + // TODO - unused?
> 3756 + XRectangle lastViewport;
>
> Can also go
>
> 3757 + // <<<<<<<<<< WEIRD STUFF <<<<<<<<<<
> 3758 +

Thanks Sam.

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

> > Where I'm aiming for is a CompScreen interface and an implementation that
> > contains classes to manage individual functional areas. This commit is a
> step
> > in that direction.
>
> +1
>
> I'd like for us all to keep this design goal in mind. CompWindow and
> CompScreen are monstrosities - even if we can specify a number of different
> interfaces they provide, this is far better for testing and refactoring then
> coding to CompScreen and friends.

Having done this exercise once I think I can get to the end result with less scary diffs. I'll create another branch and submit that.

review: Disapprove

Unmerged revisions

3026. By Alan Griffiths

Tidy up

3025. By Alan Griffiths

merge

3024. By Alan Griffiths

Tidy up

3023. By Alan Griffiths

Tests just use PrivateScreenNotDisplayBit

3022. By Alan Griffiths

Hoist init function into PrivateScreenNotDisplayBit

3021. By Alan Griffiths

First brutal attempt to split PrivateScreen into parts

3020. By Alan Griffiths

Put PrivateScreenXXX code in privatescreen.cpp

3019. By Alan Griffiths

Hoist display processing from PrivateWindow

3018. By Alan Griffiths

Merge from trunk

3017. By Alan Griffiths

?

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