Fix tag update at tag_client

This commit is contained in:
Martin Duquesnoy 2012-02-10 19:15:35 +01:00
parent 24ad1ad813
commit 3b06e2ba8f

View File

@ -92,11 +92,12 @@ tag_client(struct tag *t, struct client *c)
c->flags &= ~CLIENT_RULED; c->flags &= ~CLIENT_RULED;
infobar_elem_screen_update(c->screen, ElemTag);
/* Client remove */ /* Client remove */
if(!t) if(!t)
{
infobar_elem_screen_update(c->screen, ElemTag);
return; return;
}
c->prevtag = c->tag; c->prevtag = c->tag;
c->tag = t; c->tag = t;
@ -106,6 +107,8 @@ tag_client(struct tag *t, struct client *c)
SLIST_INSERT_HEAD(&t->clients, c, tnext); SLIST_INSERT_HEAD(&t->clients, c, tnext);
infobar_elem_screen_update(c->screen, ElemTag);
if(c->flags & CLIENT_TABMASTER && c->prevtag) if(c->flags & CLIENT_TABMASTER && c->prevtag)
{ {
struct client *cc; struct client *cc;