Re-arrange code for fix #67 (avoid code duplication)

This commit is contained in:
Raphael Khaiat 2011-01-10 20:39:14 +01:00
parent 7bb0fdcbad
commit c317afc79d

View File

@ -1247,31 +1247,33 @@ client_unmanage(Client *c)
XUngrabServer(dpy);
ewmh_get_client_list();
/* Arrange */
for(i = 0; i < screen_count() && !b; ++i)
if(c->tag == MAXTAG + 1 || c->tag == (uint)seltag[i] || tags[i][seltag[i]].tagad & TagFlag(c->tag))
b = True;
if(b)
if(c->tag == MAXTAG + 1)
{
if(c->tag == MAXTAG + 1)
{
if(c->tag == MAXTAG+1){
for(i = 0; i < conf.ntag[c->screen]; i++)
tags[c->screen][i].request_update = True;
tags[c->screen][seltag[c->screen]].layout.func(c->screen);
}
}
else
tags[c->screen][c->tag].layout.func(c->screen);
for(i = 0; i < conf.ntag[c->screen]; i++)
tags[c->screen][i].request_update = True;
tags[c->screen][seltag[c->screen]].layout.func(c->screen);
}
else
{
tags[c->screen][c->tag].request_update = True;
infobar_draw(c->screen);
/* Arrange */
for(i = 0; i < screen_count() && !b; ++i)
if(c->tag == (uint)seltag[i] || tags[i][seltag[i]].tagad & TagFlag(c->tag))
b = True;
if(b)
{
tags[c->screen][c->tag].layout.func(c->screen);
}
else
{
tags[c->screen][c->tag].request_update = True;
infobar_draw(c->screen);
}
}
/*XFree(c->title);*/
client_focus_next(c);