~smspillaz/compiz-core/compiz-core.decor_synchronization

« back to all changes in this revision

Viewing changes to include/core/option.h

Only call removeAction on the CompOption destructor and not the CompOption::Value
destructor, since plugins that make copies of CompOption::Value can cause actions to
be added through setOptionForPlugin and then those actions will be removed when the
value temporary goes away.

The action adding and removing only happens within the bounds of CompOption anyways, so
its its more appropriate to have it in its destructor.

Of course, this brings up another issue, which is that CompOption should be noncopyable
but this opens up a whole another can of worms.

How this even worked before is beyond me...

LP #931927

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <core/string.h>
32
32
 
33
33
#include <boost/variant.hpp>
 
34
#include <boost/noncopyable.hpp>
34
35
 
35
36
#include <vector>
36
37
 
47
48
 * A configuration option with boolean, int, float, String, Color, Key, Button,
48
49
 * Edge, Bell, or List.
49
50
 */
50
 
class CompOption {
 
51
class CompOption
 
52
{
51
53
        /**
52
54
         * Option data types
53
55
         */
375
377
    set (t);
376
378
}
377
379
 
378
 
 
379
 
extern CompOption::Vector noOptions;
 
380
CompOption::Vector & noOptions ();
380
381
 
381
382
#endif