Client: Swap tag in client_swap if c1->tag != c2->tag

This commit is contained in:
Martin Duquesnoy 2011-02-15 17:57:24 +01:00
parent 3cc68b6872
commit db98e3978b
3 changed files with 9 additions and 3 deletions

0
configure vendored Executable file → Normal file
View File

0
rc/status.sh Executable file → Normal file
View File

View File

@ -995,6 +995,8 @@ client_size_hints(Client *c)
void
client_swap(Client *c1, Client *c2)
{
int tmp;
/* Check if no one of these clients are free */
CHECK(!(c1->flags & FreeFlag));
CHECK(!(c2->flags & FreeFlag));
@ -1002,6 +1004,13 @@ client_swap(Client *c1, Client *c2)
if(c1 == c2)
return;
if(c1->tag != c2->tag)
{
tmp = c1->tag;
c1->tag = c2->tag;
c2->tag = tmp;
}
/* Swap only the windows */
swap_ptr((void**)&c1->win, (void**)&c2->win);
@ -1133,9 +1142,6 @@ client_set_rules(Client *c)
if(!conf.rule[i].ignoretags)
tags[c->screen][c->tag].layout.func(c->screen);
if(conf.rule[i].follow_client)
seltag[c->screen] = c->tag;
}
}
}