diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-08-08 11:31:25 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-09-14 17:39:11 (GMT) |
commit | e54bca68d2bd42f9b9c342a1564971db6e071808 (patch) | |
tree | 61f149ac9e1d7575f5da5aeaf1501c044a9e5f68 /src/FocusableList.cc | |
parent | aa84c952535a86e797226a2fe3bc5f41248c93c1 (diff) | |
download | fluxbox_pavel-e54bca68d2bd42f9b9c342a1564971db6e071808.zip fluxbox_pavel-e54bca68d2bd42f9b9c342a1564971db6e071808.tar.bz2 |
Make sure FocusableList disconnects from signals when it is destroyed
Diffstat (limited to 'src/FocusableList.cc')
-rw-r--r-- | src/FocusableList.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/FocusableList.cc b/src/FocusableList.cc index 3373890..382a6f5 100644 --- a/src/FocusableList.cc +++ b/src/FocusableList.cc | |||
@@ -94,7 +94,11 @@ FocusableList::FocusableList(BScreen &scr, const FocusableList &parent, | |||
94 | 94 | ||
95 | void FocusableList::init() { | 95 | void FocusableList::init() { |
96 | addMatching(); | 96 | addMatching(); |
97 | m_parent->attachChild(*this); | 97 | |
98 | join(m_parent->addSig(), FbTk::MemFun(*this, &FocusableList::parentWindowAdded)); | ||
99 | join(m_parent->orderSig(), FbTk::MemFun(*this, &FocusableList::parentOrderChanged)); | ||
100 | join(m_parent->removeSig(), FbTk::MemFun(*this, &FocusableList::parentWindowRemoved)); | ||
101 | join(m_parent->resetSig(), FbTk::MemFun(*this, &FocusableList::reset)); | ||
98 | 102 | ||
99 | // TODO: can't handle (head=[mouse]) yet | 103 | // TODO: can't handle (head=[mouse]) yet |
100 | if (m_pat->dependsOnCurrentWorkspace()) { | 104 | if (m_pat->dependsOnCurrentWorkspace()) { |
@@ -291,13 +295,6 @@ Focusable *FocusableList::find(const ClientPattern &pat) const { | |||
291 | return 0; | 295 | return 0; |
292 | } | 296 | } |
293 | 297 | ||
294 | void FocusableList::attachChild(FocusableList &child) const { | ||
295 | m_addsig.connect(FbTk::MemFun(child, &FocusableList::parentWindowAdded)); | ||
296 | m_ordersig.connect(FbTk::MemFun(child, &FocusableList::parentOrderChanged)); | ||
297 | m_removesig.connect(FbTk::MemFun(child, &FocusableList::parentWindowRemoved)); | ||
298 | m_resetsig.connect(FbTk::MemFun(child, &FocusableList::reset)); | ||
299 | } | ||
300 | |||
301 | void FocusableList::workspaceChanged(BScreen &screen) { | 298 | void FocusableList::workspaceChanged(BScreen &screen) { |
302 | reset(); | 299 | reset(); |
303 | } | 300 | } |