Merge lp://qastaging/~alan-griffiths/compiz-core/say-no-to-screen-global into lp://qastaging/compiz-core

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: 3027
Merged at revision: 3033
Proposed branch: lp://qastaging/~alan-griffiths/compiz-core/say-no-to-screen-global
Merge into: lp://qastaging/compiz-core
Diff against target: 102 lines (+11/-11)
4 files modified
include/core/abiversion.h (+1/-1)
include/core/screen.h (+2/-2)
src/pluginclasshandler/include/core/pluginclasshandler.h (+6/-6)
src/screen.cpp (+2/-2)
To merge this branch: bzr merge lp://qastaging/~alan-griffiths/compiz-core/say-no-to-screen-global
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Review via email: mp+95009@code.qastaging.launchpad.net

Description of the change

Remove one use of screen global

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

20 - static unsigned int allocPluginClassIndex ();
21 - static void freePluginClassIndex (unsigned int index);
22 + unsigned int allocPluginClassIndex ();
23 + void freePluginClassIndex (unsigned int index);
24 static int checkForError (Display *dpy);
25
26
27
28 === modified file 'src/pluginclasshandler/include/core/pluginclasshandler.h'
29 --- src/pluginclasshandler/include/core/pluginclasshandler.h 2012-01-12 06:48:58 +0000
30 +++ src/pluginclasshandler/include/core/pluginclasshandler.h 2012-02-28 18:01:19 +0000
31 @@ -86,7 +86,7 @@
32 * on this base class if there wasn't one already and then
33 * storing that index inside of ValueHolder
34 */
35 - static bool initializeIndex ();
36 + static bool initializeIndex (Tb *base);

Is there any reason these changed from static to nonstatic ?

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

The change from static to non-static looks correct. Required due to the changes in src/screen.cpp where we no longer use the screen global, but use "this" instead.

If they really should be static, then other methods such as sizePluginClasses would have to be made static too.

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

> Is there any reason these changed from static to nonstatic ?

That is the cleanest way to avoid use of ::screen.

The alternative begins the transformation of CompScreen into Monostate - which is a *bad idea*.

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

Looks OK, works OK.

review: Approve

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