we should reset client_sel on untag

This commit is contained in:
Julien Danjou 2007-12-14 16:01:01 +01:00
parent d197014d71
commit 37a7116c92
2 changed files with 4 additions and 4 deletions

View File

@ -484,12 +484,8 @@ client_unmanage(Client *c, long state, awesome_config *awesomeconf)
if(get_current_tag(awesomeconf->screens[c->screen])->client_sel == c) if(get_current_tag(awesomeconf->screens[c->screen])->client_sel == c)
focus(NULL, True, awesomeconf, c->screen); focus(NULL, True, awesomeconf, c->screen);
for(tag = 0; tag < awesomeconf->screens[c->screen].ntags; tag++) for(tag = 0; tag < awesomeconf->screens[c->screen].ntags; tag++)
{
if(awesomeconf->screens[c->screen].tags[tag].client_sel == c)
awesomeconf->screens[c->screen].tags[tag].client_sel = NULL;
untag_client(&awesomeconf->screens[c->screen].tclink, c, untag_client(&awesomeconf->screens[c->screen].tclink, c,
&awesomeconf->screens[c->screen].tags[tag]); &awesomeconf->screens[c->screen].tags[tag]);
}
XUngrabButton(c->display, AnyButton, AnyModifier, c->win); XUngrabButton(c->display, AnyButton, AnyModifier, c->win);
window_setstate(c->display, c->win, state); window_setstate(c->display, c->win, state);
XSync(c->display, False); XSync(c->display, False);

4
tag.c
View File

@ -75,7 +75,11 @@ untag_client(TagClientLink **head, Client *c, Tag *t)
for(tc = *head; tc; tc = tc->next) for(tc = *head; tc; tc = tc->next)
if(tc->client == c && tc->tag == t) if(tc->client == c && tc->tag == t)
{
detach_tagclientlink(head, tc); detach_tagclientlink(head, tc);
if(t->client_sel == c)
t->client_sel = NULL;
}
} }
Bool Bool