From e1dee581c6eecaefa8c36acf55437eff1256ba94 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 12 Jan 2012 21:29:35 +0100 Subject: [PATCH] Remove CLIENT_TABMSTER flag at tabbed client closing if client's tabmaster is not tabbed anymore --- src/client.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/client.c b/src/client.c index 086b26a..19a0b66 100644 --- a/src/client.c +++ b/src/client.c @@ -488,21 +488,21 @@ client_untab(struct client *c) c->flags &= ~CLIENT_TABBED; c->tabmaster = NULL; + /* Looking for tabbed client in cc, if there is not + * remove cc CLIENT_TABMASTER flag. + */ + SLIST_FOREACH(ct, &c->tag->clients, tnext) + if(ct->tabmaster == cc) + { + chk = true; + break; + } + + if(!chk) + cc->flags &= ~CLIENT_TABMASTER; + if(!(c->flags & CLIENT_DYING)) { - /* Looking for tabbed client in cc, if there is not - * remove cc CLIENT_TABMASTER flag. - */ - SLIST_FOREACH(ct, &c->tag->clients, tnext) - if(ct->tabmaster == cc) - { - chk = true; - break; - } - - if(!chk) - cc->flags &= ~CLIENT_TABMASTER; - c->geo = c->tgeo = og; layout_split_integrate(c, cc);