all repos — fluxbox @ ac00b050de43727a0e1f7d94eed0e17e72830590

custom fork of the fluxbox windowmanager

using isGroupable
fluxgen fluxgen
commit

ac00b050de43727a0e1f7d94eed0e17e72830590

parent

3a456e72e91ff9ccf98b7485b2b9a3a77e5561aa

1 files changed, 13 insertions(+), 2 deletions(-)

jump to
M src/Workspace.ccsrc/Workspace.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.32 2002/10/13 21:52:00 fluxgen Exp $ +// $Id: Workspace.cc,v 1.33 2002/10/22 14:47:22 fluxgen Exp $ #include "Workspace.hh"

@@ -354,7 +354,12 @@ #ifdef DEBUG

cerr<<__FILE__<<"("<<__LINE__<<"): Checking grouping. ("<<win.instanceName()<<"/"<< win.className()<<")"<<endl; #endif // DEBUG - + if (!win.isGroupable()) { // make sure this window can hold a tab +#ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): window can't use a tab"<<endl; +#endif // DEBUG + return; + } // go throu every group and search for matching win instancename GroupList::iterator g(m_groups.begin()); GroupList::iterator g_end(m_groups.end());

@@ -374,11 +379,17 @@ #ifdef DEBUG

cerr<<__FILE__<<" check group with : "<<(*wit)->instanceName()<<endl; #endif // DEBUG if (find_if((*g).begin(), (*g).end(), FindInGroup(*(*wit))) != (*g).end()) { + // make sure the window is groupable + if ( !(*wit)->isGroupable()) + break; // try next name //toggle tab on if ((*wit)->getTab() == 0) (*wit)->setTab(true); if (win.getTab() == 0) win.setTab(true); + // did we succefully set the tab? + if ((*wit)->getTab() == 0) + break; // try another window (*wit)->getTab()->insert(win.getTab()); return; // grouping done