From db98e3978b6f71acb2ff614c2ac3b33784ede46c Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Tue, 15 Feb 2011 17:57:24 +0100 Subject: [PATCH] Client: Swap tag in client_swap if c1->tag != c2->tag --- configure | 0 rc/status.sh | 0 src/client.c | 12 +++++++++--- 3 files changed, 9 insertions(+), 3 deletions(-) mode change 100755 => 100644 configure mode change 100755 => 100644 rc/status.sh diff --git a/configure b/configure old mode 100755 new mode 100644 diff --git a/rc/status.sh b/rc/status.sh old mode 100755 new mode 100644 diff --git a/src/client.c b/src/client.c index 40ee9ec..0304aca 100644 --- a/src/client.c +++ b/src/client.c @@ -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; } } }