arrange: Add selbytag[seltag]->win for the focus condition (maybe fix the segfault

This commit is contained in:
Martin Duquesnoy 2008-10-19 17:05:48 +02:00
parent 09646ddf85
commit c67e56f15e
2 changed files with 2 additions and 1 deletions

View File

@ -136,6 +136,7 @@ client_focus(Client *c)
XSetWindowBorder(dpy, sel->tbar->win, conf.colors.bordernormal);
}
if(c)
grabbuttons(c, True);

View File

@ -45,7 +45,7 @@ arrange(void)
tags[seltag].layout.func();
if(selbytag[seltag])
if(selbytag[seltag] && selbytag[seltag]->win)
client_focus(selbytag[seltag]);
else
client_focus(NULL);