all repos — fluxbox @ 875d63b6d955850b07825cc3228bc7d638f89bc5

custom fork of the fluxbox windowmanager

tabs default off
fluxgen fluxgen
commit

875d63b6d955850b07825cc3228bc7d638f89bc5

parent

3e08be1c2abe6830f62432302b3836cb0d82fcce

1 files changed, 19 insertions(+), 5 deletions(-)

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

@@ -19,7 +19,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: Tab.cc,v 1.23 2002/04/09 23:15:36 fluxgen Exp $ +// $Id: Tab.cc,v 1.24 2002/04/14 22:27:57 fluxgen Exp $ #include "Tab.hh"

@@ -262,6 +262,8 @@ //------------------------------------------

void Tab::iconify() { disconnect(); withdraw(); + if(!Fluxbox::instance()->useTabs() && !m_next && !m_prev)//if we don't want to use tabs that much + m_win->setTab(false);//let's get rid of this loner tab } //------------ withdraw --------------

@@ -671,9 +673,11 @@ //find window on coordinates of buttonReleaseEvent

if (XTranslateCoordinates(m_display, m_win->getScreen()->getRootWindow(), m_win->getScreen()->getRootWindow(), be->x_root, be->y_root, &dest_x, &dest_y, &child)) { - + Tab *tab = Fluxbox::instance()->searchTab(child); FluxboxWindow *win = Fluxbox::instance()->searchWindow(child); + if(win!=0 && m_win->getScreen()->isSloppyWindowGrouping()) + win->setTab(true); //search tablist for a tabwindow if ( (tab!=0) || (m_win->getScreen()->isSloppyWindowGrouping() && (win!=0) && (tab = win->getTab())!=0)) {

@@ -689,7 +693,7 @@

// attach this tabwindow chain to the tabwindow chain we found. tab->insert(this); - } else { + } else { //Dropped nowhere disconnect(); // convenience

@@ -736,6 +740,8 @@ }

//TODO: this causes an calculate increase event, even if we // only are moving a window m_win->configure(dest_x, dest_y, m_win->getWidth(), m_win->getHeight()); + if(!Fluxbox::instance()->useTabs()) + m_win->setTab(0);//Remove tab from window, as it is now alone... } } } else {

@@ -971,13 +977,21 @@ // Disconnects the tab from any chain

//-------------------------------------- void Tab::disconnect() { Tab *tmp = 0; + + Fluxbox *fluxbox = Fluxbox::instance(); if (m_prev) { //if this have a chain to "the left" (previous tab) then set it's next to this next m_prev->m_next = m_next; - tmp = m_prev; + if(!m_next && !fluxbox->useTabs())//Only two tabs in list, remove tab from remaining window + m_prev->m_win->setTab(false); + else + tmp = m_prev; } if (m_next) { //if this have a chain to "the right" (next tab) then set it's prev to this prev m_next->m_prev = m_prev; - tmp = m_next; + if(!m_prev && !fluxbox->useTabs())//Only two tabs in list, remove tab from remaining window + m_next->m_win->setTab(false); + else + tmp = m_next; } //mark as no chain, previous and next.