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);