aboutsummaryrefslogtreecommitdiff
path: root/src/Workspace.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-22 14:47:22 (GMT)
committerfluxgen <fluxgen>2002-10-22 14:47:22 (GMT)
commitac00b050de43727a0e1f7d94eed0e17e72830590 (patch)
treed83e2e3c5ad43a4d09157d6ce7872c4537415067 /src/Workspace.cc
parent3a456e72e91ff9ccf98b7485b2b9a3a77e5561aa (diff)
downloadfluxbox-ac00b050de43727a0e1f7d94eed0e17e72830590.zip
fluxbox-ac00b050de43727a0e1f7d94eed0e17e72830590.tar.bz2
using isGroupable
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r--src/Workspace.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc
index 6275062..036fc46 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.32 2002/10/13 21:52:00 fluxgen Exp $ 25// $Id: Workspace.cc,v 1.33 2002/10/22 14:47:22 fluxgen Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -354,7 +354,12 @@ void Workspace::checkGrouping(FluxboxWindow &win) {
354 cerr<<__FILE__<<"("<<__LINE__<<"): Checking grouping. ("<<win.instanceName()<<"/"<< 354 cerr<<__FILE__<<"("<<__LINE__<<"): Checking grouping. ("<<win.instanceName()<<"/"<<
355 win.className()<<")"<<endl; 355 win.className()<<")"<<endl;
356#endif // DEBUG 356#endif // DEBUG
357 357 if (!win.isGroupable()) { // make sure this window can hold a tab
358#ifdef DEBUG
359 cerr<<__FILE__<<"("<<__LINE__<<"): window can't use a tab"<<endl;
360#endif // DEBUG
361 return;
362 }
358 // go throu every group and search for matching win instancename 363 // go throu every group and search for matching win instancename
359 GroupList::iterator g(m_groups.begin()); 364 GroupList::iterator g(m_groups.begin());
360 GroupList::iterator g_end(m_groups.end()); 365 GroupList::iterator g_end(m_groups.end());
@@ -374,11 +379,17 @@ void Workspace::checkGrouping(FluxboxWindow &win) {
374 cerr<<__FILE__<<" check group with : "<<(*wit)->instanceName()<<endl; 379 cerr<<__FILE__<<" check group with : "<<(*wit)->instanceName()<<endl;
375#endif // DEBUG 380#endif // DEBUG
376 if (find_if((*g).begin(), (*g).end(), FindInGroup(*(*wit))) != (*g).end()) { 381 if (find_if((*g).begin(), (*g).end(), FindInGroup(*(*wit))) != (*g).end()) {
382 // make sure the window is groupable
383 if ( !(*wit)->isGroupable())
384 break; // try next name
377 //toggle tab on 385 //toggle tab on
378 if ((*wit)->getTab() == 0) 386 if ((*wit)->getTab() == 0)
379 (*wit)->setTab(true); 387 (*wit)->setTab(true);
380 if (win.getTab() == 0) 388 if (win.getTab() == 0)
381 win.setTab(true); 389 win.setTab(true);
390 // did we succefully set the tab?
391 if ((*wit)->getTab() == 0)
392 break; // try another window
382 (*wit)->getTab()->insert(win.getTab()); 393 (*wit)->getTab()->insert(win.getTab());
383 394
384 return; // grouping done 395 return; // grouping done