aboutsummaryrefslogtreecommitdiff
path: root/src/Workspace.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-07 17:49:07 (GMT)
committerfluxgen <fluxgen>2003-12-07 17:49:07 (GMT)
commite9be87766bd5e3353217d49037f971d43e548d3a (patch)
tree638e63acf8b56f81ec0f0bad24e90139d0d8b2c6 /src/Workspace.cc
parentb8c1d3e5ee0674bfe33d6af78cb6d3ff5cf1d85e (diff)
downloadfluxbox-e9be87766bd5e3353217d49037f971d43e548d3a.zip
fluxbox-e9be87766bd5e3353217d49037f971d43e548d3a.tar.bz2
observe title signal
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r--src/Workspace.cc30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc
index 73bd537..3b339a0 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Workspace.cc,v 1.84 2003/12/03 23:05:29 fluxgen Exp $ 25// $Id: Workspace.cc,v 1.85 2003/12/07 17:49:07 fluxgen Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -157,6 +157,8 @@ void Workspace::addWindow(FluxboxWindow &w, bool place) {
157 return; 157 return;
158 158
159 w.setWorkspace(m_id); 159 w.setWorkspace(m_id);
160 // attach signals
161 w.titleSig().attach(this);
160 162
161 if (place) 163 if (place)
162 placeWindow(w); 164 placeWindow(w);
@@ -181,6 +183,9 @@ int Workspace::removeWindow(FluxboxWindow *w) {
181 if (w == 0) 183 if (w == 0)
182 return -1; 184 return -1;
183 185
186 // detach from signals
187 w->titleSig().detach(this);
188
184 if (m_lastfocus == w) { 189 if (m_lastfocus == w) {
185 m_lastfocus = 0; 190 m_lastfocus = 0;
186 } 191 }
@@ -231,20 +236,6 @@ int Workspace::removeWindow(FluxboxWindow *w) {
231 return m_windowlist.size(); 236 return m_windowlist.size();
232} 237}
233 238
234void Workspace::removeWindow(WinClient &client) {
235 if (client.m_win == 0)
236 return;
237
238 if (client.m_win->numClients() == 0) {
239 Windows::iterator erase_it = remove(m_windowlist.begin(),
240 m_windowlist.end(), client.m_win);
241 if (erase_it != m_windowlist.end())
242 m_windowlist.erase(erase_it);
243 }
244
245 updateClientmenu();
246}
247
248void Workspace::showAll() { 239void Workspace::showAll() {
249 Windows::iterator it = m_windowlist.begin(); 240 Windows::iterator it = m_windowlist.begin();
250 Windows::iterator it_end = m_windowlist.end(); 241 Windows::iterator it_end = m_windowlist.end();
@@ -378,7 +369,7 @@ bool Workspace::loadGroups(const std::string &filename) {
378 return true; 369 return true;
379} 370}
380 371
381void Workspace::update() { 372void Workspace::update(FbTk::Subject *subj) {
382 m_clientmenu.update(); 373 m_clientmenu.update();
383} 374}
384 375
@@ -407,13 +398,6 @@ void Workspace::setName(const std::string &name) {
407 clears the m_windowlist 398 clears the m_windowlist
408*/ 399*/
409void Workspace::shutdown() { 400void Workspace::shutdown() {
410#ifdef DEBUG
411 cerr<<__FILE__<<"("<<__FUNCTION__<<"): scr "<<screen().screenNumber()<<", ws "<<
412 m_id<<", windowlist:"<<endl;
413 copy(m_windowlist.begin(), m_windowlist.end(),
414 ostream_iterator<FluxboxWindow *>(cerr, " \n"));
415 cerr<<endl;
416#endif // DEBUG
417 // note: when the window dies it'll remove it self from the list 401 // note: when the window dies it'll remove it self from the list
418 while (!m_windowlist.empty()) { 402 while (!m_windowlist.empty()) {
419 // restore with remap on all clients in that window 403 // restore with remap on all clients in that window