Age | Commit message (Collapse) | Author | Files | Lines |
|
This way we can use Commands as signal handlers out-of-the-box.
|
|
Added some polish around them and, to mark this special occasion, moved them out of the SigImpl
namespace.
PS: This partially reverts commit 0775350fee345e37fb59835dda4d85664346b606, since I had to
reintroduce ReturnType template parameter, because it will be used in lua. But Signal classes
remain without the ReturnType, because I still cannot imagine how would it be used.
|
|
previously, the tracker disconnected itself only when the caller passed withTracker = true to the
leave() function. However, the default value was for the parameter was false.
Non disconnecting from signal when stopping tracking creates very dangerous situation because the
signal still holds a pointer to the tracker. This resulted in a segfault when exiting fluxbox,
because the tracker (FluxboxWindow) got destroyed before the signal (BScreen::focusedWindowSig),
and the signal was using an invalid pointer when it tried to disconnect itself from the tracker.
Instead of setting withTracker to true by default or changing all invocations of leave(), I
decided to make the tracker disconnect itself unconditionally because I could not find a use case
for the opposite behaviour.
PS: This message is in fact longer than the actual commit.
|
|
- merged all the common stuff from 0,1,2,3 argument versions into one common base class
- removed ReturnType template parameter as it was instantiated with "void" everywhere and the
current ignores the return value of the callbacks anyway
|
|
this was possible (and used) with FbTk::Subject, but the implemetation of FbTk::Signal didn't
support it, which made it impossible to continue with conversion.
|
|
Replace CallbackHolder, FunctorHolder and SlotHolder with a (smaller) set of polymorphic classes.
SignalHolder now stores a (smart) pointer to the class.
|
|
basically, i just got rid of Signal[0-3] classes and moved their contents to the appropriate
specialization of FbTk::Signal
also, this fixes the
no matching function for call to 'MemFunIgnoreArgs(FbTk::Signal<void, FbTk::SigImpl::EmptyArg,
FbTk::SigImpl::EmptyArg, FbTk::SigImpl::EmptyArg>&, void (FbTk::SigImpl::Signal0<void>::*)())'
error i had in the following commit.
|
|
While 769130f51a8f did fix one issue, it introduced another by changing the
logic related to the new SignalTracker. The original logic (introduced in
9ad388c5bf16) was:
-> in 'leave(Signal)', only call 'disconnect'
-> in 'leaveAll()', call 'disconnect' and 'disconnectTracker'
But 769130f51a8f inverted this, calling 'disconnectTracker' in both cases but
only 'disconnect' in the 'leaveAll()' case, which would leave unattached signals
around after calling 'leave(Signal)'.
This fix not only repairs the logic, but renames the ambiguous 'disconnect'
boolean to something more explicit: 'withTracker'.
|
|
gets destroyed
|
|
22fa5f544b35 was not fixing anything, the real cause is that the
SignalHolder still has a reference to a not existing Tracker.
|
|
'pure virtual method called'
|
|
This is used by SignalTracker so Signals can disconnect from it when
they die.
|
|
initialize this from that'
|
|
|
|
used before all screens dies.
|
|
|
|
This is suppose to replace the obsolete Subject/Observer classes.
See the src/tests/testSignals.cc for basic usage.
|