Merge lp:~smspillaz/compiz-core/compiz-core.fix_931927 into lp:compiz-core

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 3010
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.fix_931927
Merge into: lp:compiz-core
Diff against target: 420 lines (+87/-89)
9 files modified
include/core/abiversion.h (+1/-1)
include/core/option.h (+3/-3)
include/core/plugin.h (+2/-2)
plugins/move/src/move.cpp (+7/-7)
plugins/resize/src/resize.cpp (+7/-7)
src/event.cpp (+1/-1)
src/option.cpp (+62/-64)
src/plugin.cpp (+1/-1)
src/session.cpp (+3/-3)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.fix_931927
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Daniel van Vugt Approve
Tim Penhey Pending
Review via email: mp+93779@code.launchpad.net

This proposal supersedes a proposal from 2012-02-16.

Description of the change

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...

bug 931927

(See also lp:~smspillaz/compiz-expo-plugin/compiz-expo-plugin.api_change_931927)

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

The noOptions API change makes me nervous. Especially the part about returning a reference to a static local:

203 +CompOption::Vector &
204 +noOptions ()
205 +{
206 + static CompOption::Vector v (0);
207 + return v;
208 +}

Why not just change the global:
    CompOption::Vector noOptions (0);
to:
    const CompOption::Vector noOptions (0);
??

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

And change:
    extern CompOption::Vector noOptions;
to:
    extern const CompOption::Vector noOptions;

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

And the same for all of:
164 -CompOption::Vector noOptions (0);
165 -CompOption::Value::Vector emptyList;
166 -CompString emptyString;
167 -CompMatch emptyMatch;
168 -CompAction emptyAction;
169 -unsigned short emptyColor[4];

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

All the globals should remain globals instead of functions. Perhaps convert them to const for safety.

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Static initialization and destruction, basically.

There's a case where the destructor would be called on the global when a plugin was loaded (compiler, linker bug?) before it was actually fully constructed.

I would have made them const, but a lot of the Option* code requires a non const reference. It worked fine even when the globals weren't const, so I don't think this is an issue.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

OK, that's not a compiler/linker/loader bug at all. That is correct behaviour. I have seen many such static ctor/dtor DSO bugs on various Unixes before, but not Linux, at least not for ~10 years.

The real problem must be globals using other globals during their construction/destruction (again). That's what really needs fixing I think.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Its not worth fixing in this branch :)

The best way to get around this fiasco, is like the article says, to use the construct-upon-access idiom which is what I have done here.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> OK, that's not a compiler/linker/loader bug at all. That is correct behaviour.
> I have seen many such static ctor/dtor DSO bugs on various Unixes before, but
> not Linux, at least not for ~10 years.

To clarify, I guess the reason why I said linker bug was because of this

#0 CompAction::active
#1 CompOption::~CompOption // wtf ?
#2 __static_initialization_and_destruction

The use of uninitialized globals within the constructors of other globals is fine, but calling the destructor to a static object before we hit main () is very strange indeed.

(And yes, I've hit compiler bugs before where destructors were incorrectly called :P)

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

OK, I agree it's a quick fix that should work, even though it impacts the public API in a less than ideal way.

Alan already started logging bugs describing the removal of globals such as screen (in the distant future)...

review: Abstain
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

And I do believe you now :)

But you will probably find some obscure DSO-related reason for the apparently premature destruction.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> OK, I agree it's a quick fix that should work, even though it impacts the
> public API in a less than ideal way.
>
> Alan already started logging bugs describing the removal of globals such as
> screen (in the distant future)...

The good news is that only one plugin was impacted by this.

It would be so awesome if const references could be NULL. I guess that's what exceptions are for.

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

I have to agree with Daniel on a number of points. This is kinda ick, but
better than nothing as far as I can tell.

Might as well remove the boost/noncopyable header since you are not using it.

You do hit a couple of differences here.

Static initialisation initially zeros things out. So...

unsigned short emptyColor[4];
would be zero initialised.

When you have a static variable in a function, I don't think it is zero
initialised. Worth checking with Alan about that. So, inside the emptyColor
function use:
  static unsigned short v[4] = {0,0,0,0};

We need to file bugs about the catch (...) bits, that's just ick.

I can't comment on whether this fix actually works. Ideally we'd have test
coverage :-(

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

> And I do believe you now :)
>
> But you will probably find some obscure DSO-related reason for the apparently
> premature destruction.

What do you mean by DSO-related?

And I have to say that everytime I've come across a weird destruction bug, whether mis-timed or double delete, it has been a coding error, not the compiler.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

I mean that if this destruction issue /is/ a bug then it is most likely triggered by using dynamic shared objects. I've seen many such loader/construction/destruction bugs before. But none in Linux since at least before Ubuntu existed.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Re: "Static initialisation initially zeros things out"

Is that in the C++ spec? As far as I know, basic types like;
    unsigned short emptyColor[4];
will not be initialized at all, because they don't have a constructor.

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

> Re: "Static initialisation initially zeros things out"
>
> Is that in the C++ spec? As far as I know, basic types like;
> unsigned short emptyColor[4];
> will not be initialized at all, because they don't have a constructor.

Normally no, but for statics / globals, yes.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

If that's true I would still recommend explicit initialization for the sake of readability :)

Revision history for this message
Tim Penhey (thumper) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal

> Re: "Static initialisation initially zeros things out"
>
> Is that in the C++ spec? As far as I know, basic types like;
> unsigned short emptyColor[4];
> will not be initialized at all, because they don't have a constructor.

Local statics have a special case (don't you just love C++) - they are zero initialized (the same as namespace scope variables - which is what they are to the link loader).

Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal

Oh, and you don't need

"static unsigned short v[4] = {0,0,0,0};"

either:

"static unsigned short v[] = {0,0,0,0};"

or

"static unsigned short v[4] = {0};"

is fine

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

*** Found the problem ***

CompOption::Vector noOptions (0);
causes a reserve of at least one CompOption to be constructed (and then quickly destructed)

The fix is to change:
    CompOption::Vector noOptions (0);
to:
    CompOption::Vector noOptions;

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> *** Found the problem ***
>
> CompOption::Vector noOptions (0);
> causes a reserve of at least one CompOption to be constructed (and then
> quickly destructed)
>
> The fix is to change:
> CompOption::Vector noOptions (0);
> to:
> CompOption::Vector noOptions;

It is still better to use the on-demand construction, for reasons specified above. I'll fix this though.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

This means we don't need to change the public API of "noOptions" or need to change any plugins. You're now doing it for stylistic reasons only. :)

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

There is still a risk involved. I'd much prefer to have less risky code then to be tripped up later.

This isn't "purely stylistic"

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

(Also as evidenced by the fact that PrivateAction was not even created during static initialization and destruction makes me more inclined to make it like this)

Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal

170 + CompString & emptyString ()

Rather invites:

emptyString () = CompString("Murphy rules!");

(The same applies to a lot of the functions, and the original [non-]constants.)

So, we should add const to the "constants" while addressing this problem.

On the comment discussion: Global data, monostate & singleton are all likely causes for issues. So this code could do with some cleanup regardless of "on demand" or "global data".

As Sam says, it is slightly safer to use "on demand" than global variables - as it ensures they have actually been initialized before use. OTOH, if we "know" there is no init-sequence issue that only makes the design marginally better.

So, I wouldn't have done the "wrapping" if the problem can be fixed more simply. But, if we had the code ready to go I'd take it, it make the codebase a safer place to live.

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

I can remove all the global data, but I can tell you know that the diff is going to get a *lot* bigger (ditto for adding constness)

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

Sam, if the change to the vector constructor is enough to fix this bug, we should go with the simplest possible branch.

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

I have to admit to preferring to use the default constructor for vectors rather than trying to be clever with the size. It also means that people don't have to go and look for what the integer parameter constructor does.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal

"Don't initialize to list size zero since that creates a temporary and destroys it
(for gosh knows what reasons)"

That's because it calls a constructor with a default parameter. Vis:

CompOption::Vector(o, CompOption());

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

I'd really like to know what all the push back on delaying initialization till use is, its a far safer way of doing things and doesn't have any obvious drawbacks.

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

Please also change the constructor in noOptions too:

  static CompOption::Vector v (0);

should be:

  static CompOption::Vector v;

Given that there were also issues around the ordering of the static object initialisation that Sam said he saw, I'm in favour of landing this branch. However, we should look to clean the whole mess up soonish.

I want to know though what the impact is of making these constants.

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Yes indeed on demand construction is more than stylistic. I think my clumsy words missed the point there. My point should have been that on demand construction (while being good for preventative maintenance), is causing a lot more code to change just before a release. And that's a risk.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Conditionally approved, pending the 1-line fix Tim mentioned:
210 + static CompOption::Vector v (0);
becomes:
210 + static CompOption::Vector v;

I've also tested for further API breakage in libcompizconfig, compiz-plugins-main and compiz-plugins-extra. Only main (expo) failed, which Sam has already proposed a fix for.

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Impact of removing the const is that we need to remove these

CompAction &
CompOption::Value::action ()
{
    try
    {
 return boost::get<CompAction>(mValue);
    }
    catch (...)
    {
 return emptyAction ();
    }
}

CompMatch &
CompOption::Value::match ()
{
    try
    {
 return boost::get<CompMatch>(mValue);
    }
    catch (...)
    {
 return emptyMatch ();
    }
}

CompString &
CompOption::Value::s ()
{
    try
    {
 return boost::get < CompString > (mValue);
    }
    catch (...)
    {
 return emptyString ();
    }
}

which I am +1 for but I'm not sure how much client code uses these

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

Satisfies my previous comment.

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

Reads OK.

Still concerned about the lack of const-safety, But willing to leave that for posterity.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/core/abiversion.h'
2--- include/core/abiversion.h 2012-01-25 13:46:33 +0000
3+++ include/core/abiversion.h 2012-02-20 08:16:21 +0000
4@@ -5,6 +5,6 @@
5 # error Conflicting definitions of CORE_ABIVERSION
6 #endif
7
8-#define CORE_ABIVERSION 20120125
9+#define CORE_ABIVERSION 20120216
10
11 #endif // COMPIZ_ABIVERSION_H
12
13=== modified file 'include/core/option.h'
14--- include/core/option.h 2012-01-31 14:52:20 +0000
15+++ include/core/option.h 2012-02-20 08:16:21 +0000
16@@ -47,7 +47,8 @@
17 * A configuration option with boolean, int, float, String, Color, Key, Button,
18 * Edge, Bell, or List.
19 */
20-class CompOption {
21+class CompOption
22+{
23 /**
24 * Option data types
25 */
26@@ -375,7 +376,6 @@
27 set (t);
28 }
29
30-
31-extern CompOption::Vector noOptions;
32+CompOption::Vector & noOptions ();
33
34 #endif
35
36=== modified file 'include/core/plugin.h'
37--- include/core/plugin.h 2012-02-01 17:49:07 +0000
38+++ include/core/plugin.h 2012-02-20 08:16:21 +0000
39@@ -268,7 +268,7 @@
40 {
41 CompOption::Class *oc = dynamic_cast<CompOption::Class *> (T::get (screen));
42 if (!oc)
43- return noOptions;
44+ return noOptions ();
45 return oc->getOptions ();
46 }
47
48@@ -306,7 +306,7 @@
49 {
50 CompOption::Class *oc = dynamic_cast<CompOption::Class *> (T::get (screen));
51 if (!oc)
52- return noOptions;
53+ return noOptions ();
54 return oc->getOptions ();
55 }
56
57
58=== modified file 'plugins/move/src/move.cpp'
59--- plugins/move/src/move.cpp 2012-02-01 14:03:38 +0000
60+++ plugins/move/src/move.cpp 2012-02-20 08:16:21 +0000
61@@ -511,7 +511,7 @@
62 {
63 moveTerminate (&optionGetInitiateButton (),
64 CompAction::StateTermButton,
65- noOptions);
66+ noOptions ());
67 }
68 }
69 }
70@@ -606,9 +606,9 @@
71 if (ms->w->id () == event->xclient.window)
72 {
73 moveTerminate (&optionGetInitiateButton (),
74- CompAction::StateCancel, noOptions);
75+ CompAction::StateCancel, noOptions ());
76 moveTerminate (&optionGetInitiateKey (),
77- CompAction::StateCancel, noOptions);
78+ CompAction::StateCancel, noOptions ());
79
80 }
81 }
82@@ -617,15 +617,15 @@
83 case DestroyNotify:
84 if (w && w->id () == event->xdestroywindow.window)
85 {
86- moveTerminate (&optionGetInitiateButton (), 0, noOptions);
87- moveTerminate (&optionGetInitiateKey (), 0, noOptions);
88+ moveTerminate (&optionGetInitiateButton (), 0, noOptions ());
89+ moveTerminate (&optionGetInitiateKey (), 0, noOptions ());
90 }
91 break;
92 case UnmapNotify:
93 if (w && w->id () == event->xunmap.window)
94 {
95- moveTerminate (&optionGetInitiateButton (), 0, noOptions);
96- moveTerminate (&optionGetInitiateKey (), 0, noOptions);
97+ moveTerminate (&optionGetInitiateButton (), 0, noOptions ());
98+ moveTerminate (&optionGetInitiateKey (), 0, noOptions ());
99 }
100 default:
101 break;
102
103=== modified file 'plugins/resize/src/resize.cpp'
104--- plugins/resize/src/resize.cpp 2012-02-09 07:48:57 +0000
105+++ plugins/resize/src/resize.cpp 2012-02-20 08:16:21 +0000
106@@ -1259,7 +1259,7 @@
107 CompAction *action = &optionGetInitiateButton ();
108
109 resizeTerminate (action, CompAction::StateTermButton,
110- noOptions);
111+ noOptions ());
112 }
113 }
114 }
115@@ -1356,9 +1356,9 @@
116 if (rs->w->id () == event->xclient.window)
117 {
118 resizeTerminate (&optionGetInitiateButton (),
119- CompAction::StateCancel, noOptions);
120+ CompAction::StateCancel, noOptions ());
121 resizeTerminate (&optionGetInitiateKey (),
122- CompAction::StateCancel, noOptions);
123+ CompAction::StateCancel, noOptions ());
124 }
125 }
126 }
127@@ -1366,15 +1366,15 @@
128 case DestroyNotify:
129 if (w && w->id () == event->xdestroywindow.window)
130 {
131- resizeTerminate (&optionGetInitiateButton (), 0, noOptions);
132- resizeTerminate (&optionGetInitiateKey (), 0, noOptions);
133+ resizeTerminate (&optionGetInitiateButton (), 0, noOptions ());
134+ resizeTerminate (&optionGetInitiateKey (), 0, noOptions ());
135 }
136 break;
137 case UnmapNotify:
138 if (w && w->id () == event->xunmap.window)
139 {
140- resizeTerminate (&optionGetInitiateButton (), 0, noOptions);
141- resizeTerminate (&optionGetInitiateKey (), 0, noOptions);
142+ resizeTerminate (&optionGetInitiateButton (), 0, noOptions ());
143+ resizeTerminate (&optionGetInitiateKey (), 0, noOptions ());
144 }
145 default:
146 break;
147
148=== modified file 'src/event.cpp'
149--- src/event.cpp 2012-02-17 09:17:31 +0000
150+++ src/event.cpp 2012-02-20 08:16:21 +0000
151@@ -306,7 +306,7 @@
152 {
153 if (!o.value ().action ().terminate ().empty ())
154 o.value ().action ().terminate () (&o.value ().action (),
155- state, noOptions);
156+ state, noOptions ());
157 }
158 }
159
160
161=== modified file 'src/option.cpp'
162--- src/option.cpp 2012-02-08 15:31:32 +0000
163+++ src/option.cpp 2012-02-20 08:16:21 +0000
164@@ -35,12 +35,47 @@
165 #include <core/option.h>
166 #include "privateoption.h"
167
168-CompOption::Vector noOptions (0);
169-CompOption::Value::Vector emptyList;
170-CompString emptyString;
171-CompMatch emptyMatch;
172-CompAction emptyAction;
173-unsigned short emptyColor[4];
174+namespace
175+{
176+ CompOption::Value::Vector & emptyList ()
177+ {
178+ static CompOption::Value::Vector v;
179+ return v;
180+ }
181+
182+ CompString & emptyString ()
183+ {
184+ static CompString v;
185+ return v;
186+ }
187+
188+ CompMatch & emptyMatch ()
189+ {
190+ static CompMatch v;
191+ return v;
192+ }
193+
194+ CompAction & emptyAction ()
195+ {
196+ static CompAction v;
197+ return v;
198+ }
199+
200+ unsigned short * emptyColor ()
201+ {
202+ static unsigned short v[4] = { 0, 0, 0, 0 };
203+ return v;
204+ }
205+}
206+
207+CompOption::Vector &
208+noOptions ()
209+{
210+ static CompOption::Vector v;
211+ return v;
212+}
213+
214+
215
216 static bool
217 checkIsAction (CompOption::Type type)
218@@ -59,32 +94,8 @@
219 return false;
220 }
221
222-static void
223-finiOptionValue (CompOption::Value &v)
224-{
225- switch (v.type()) {
226- case CompOption::TypeAction:
227- case CompOption::TypeKey:
228- case CompOption::TypeButton:
229- case CompOption::TypeEdge:
230- case CompOption::TypeBell:
231- if (v.action ().state () & CompAction::StateAutoGrab && screen)
232- screen->removeAction (&v.action ());
233- break;
234-
235- case CompOption::TypeList:
236- foreach (CompOption::Value &val, v.list ())
237- finiOptionValue (val);
238- break;
239-
240- default:
241- break;
242- }
243-}
244-
245 CompOption::Value::~Value()
246 {
247- finiOptionValue(*this);
248 }
249
250 void
251@@ -142,7 +153,7 @@
252 }
253 catch (...)
254 {
255- return emptyColor;
256+ return emptyColor ();
257 }
258 }
259
260@@ -155,7 +166,7 @@
261 }
262 catch (...)
263 {
264- return emptyString;
265+ return emptyString ();
266 }
267 }
268
269@@ -168,7 +179,7 @@
270 }
271 catch (...)
272 {
273- return emptyString;
274+ return emptyString ();
275 }
276 }
277
278@@ -181,7 +192,7 @@
279 }
280 catch (...)
281 {
282- return emptyMatch;
283+ return emptyMatch ();
284 }
285 }
286
287@@ -194,7 +205,7 @@
288 }
289 catch (...)
290 {
291- return emptyMatch;
292+ return emptyMatch ();
293 }
294 }
295
296@@ -207,7 +218,7 @@
297 }
298 catch (...)
299 {
300- return emptyAction;
301+ return emptyAction ();
302 }
303 }
304
305@@ -220,7 +231,7 @@
306 }
307 catch (...)
308 {
309- return emptyAction;
310+ return emptyAction ();
311 }
312 }
313
314@@ -235,7 +246,7 @@
315 }
316 catch (...)
317 {
318- return emptyList;
319+ return emptyList ();
320 }
321 }
322
323@@ -248,7 +259,7 @@
324 }
325 catch (...)
326 {
327- return emptyList;
328+ return emptyList ();
329 }
330 }
331
332@@ -416,33 +427,20 @@
333 setName (name, type);
334 }
335
336-static void
337-finiScreenOptionValue (CompScreen *s,
338- CompOption::Value &v)
339-{
340- switch (v.type()) {
341- case CompOption::TypeAction:
342- case CompOption::TypeKey:
343- case CompOption::TypeButton:
344- case CompOption::TypeEdge:
345- case CompOption::TypeBell:
346- if (v.action ().state () & CompAction::StateAutoGrab)
347- s->removeAction (&v.action ());
348- break;
349-
350- case CompOption::TypeList:
351- foreach (CompOption::Value &val, v.list ())
352- finiScreenOptionValue (s, val);
353- break;
354-
355- default:
356- break;
357- }
358-}
359-
360 CompOption::~CompOption ()
361 {
362- finiOptionValue (priv->value);
363+ /* Remove any added actions */
364+ try
365+ {
366+ CompAction &action = value ().action ();
367+
368+ if (action.active () && screen)
369+ screen->removeAction (&action);
370+ }
371+ catch (...)
372+ {
373+ }
374+
375 delete priv;
376 }
377
378
379=== modified file 'src/plugin.cpp'
380--- src/plugin.cpp 2012-01-31 17:01:32 +0000
381+++ src/plugin.cpp 2012-02-20 08:16:21 +0000
382@@ -661,7 +661,7 @@
383 CompOption::Vector &
384 CompPlugin::VTable::getOptions ()
385 {
386- return noOptions;
387+ return noOptions ();
388 }
389
390 bool
391
392=== modified file 'src/session.cpp'
393--- src/session.cpp 2012-01-19 18:12:31 +0000
394+++ src/session.cpp 2012-02-20 08:16:21 +0000
395@@ -220,7 +220,7 @@
396 dieCallback (SmcConn connection,
397 SmPointer clientData)
398 {
399- screen->sessionEvent (CompSession::EventDie, noOptions);
400+ screen->sessionEvent (CompSession::EventDie, noOptions ());
401
402 CompSession::close ();
403 exit (0);
404@@ -230,14 +230,14 @@
405 saveCompleteCallback (SmcConn connection,
406 SmPointer clientData)
407 {
408- screen->sessionEvent (CompSession::EventSaveComplete, noOptions);
409+ screen->sessionEvent (CompSession::EventSaveComplete, noOptions ());
410 }
411
412 static void
413 shutdownCancelledCallback (SmcConn connection,
414 SmPointer clientData)
415 {
416- screen->sessionEvent (CompSession::EventShutdownCancelled, noOptions);
417+ screen->sessionEvent (CompSession::EventShutdownCancelled, noOptions ());
418 }
419
420 void

Subscribers

People subscribed via source and target branches