From c032d24640fd62549ad7df3ee81365fb71a465b8 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sun, 29 Mar 2009 01:51:14 +0100 Subject: [PATCH] Client: Fix feature #3. --- src/tag.c | 10 +++++++++- src/wmfs.c | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/tag.c b/src/tag.c index 4011d1b..fd0dce7 100644 --- a/src/tag.c +++ b/src/tag.c @@ -40,6 +40,7 @@ void tag_set(int tag) { int otag; + Client *c; screen_get_sel(); @@ -70,7 +71,14 @@ tag_set(int tag) infobar_set_position(tags[selscreen][seltag[selscreen]].barpos); arrange(selscreen); - client_focus(NULL); + + /* To focus the first client in the new tag */ + for(c = clients; c; c = c->next) + if(c->tag == seltag[selscreen] && c->screen == selscreen) + break; + + client_focus((c) ? c : NULL); + return; } diff --git a/src/wmfs.c b/src/wmfs.c index f5c5f2c..d827532 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -104,6 +104,7 @@ quit(void) XFreeCursor(dpy, cursor[CurMove]); XFreeCursor(dpy, cursor[CurResize]); infobar_destroy(); + IFREE(sgeo); IFREE(infobar); IFREE(keys);