From 37a7116c923f6158c16a146a650c8231373bd0cd Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 14 Dec 2007 16:01:01 +0100 Subject: [PATCH] we should reset client_sel on untag --- client.c | 4 ---- tag.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index 4f93c49c..65b85b69 100644 --- a/client.c +++ b/client.c @@ -484,12 +484,8 @@ client_unmanage(Client *c, long state, awesome_config *awesomeconf) if(get_current_tag(awesomeconf->screens[c->screen])->client_sel == c) focus(NULL, True, awesomeconf, c->screen); 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, &awesomeconf->screens[c->screen].tags[tag]); - } XUngrabButton(c->display, AnyButton, AnyModifier, c->win); window_setstate(c->display, c->win, state); XSync(c->display, False); diff --git a/tag.c b/tag.c index 481266ae..a2259ba3 100644 --- a/tag.c +++ b/tag.c @@ -75,7 +75,11 @@ untag_client(TagClientLink **head, Client *c, Tag *t) for(tc = *head; tc; tc = tc->next) if(tc->client == c && tc->tag == t) + { detach_tagclientlink(head, tc); + if(t->client_sel == c) + t->client_sel = NULL; + } } Bool