From 3f203e3327e7fdc3817375e7dfc7186b0e3633b9 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 15 Nov 2007 15:44:16 +0100 Subject: [PATCH] remove old screen client_sel if needed --- screen.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/screen.c b/screen.c index 33624757..af8f671c 100644 --- a/screen.c +++ b/screen.c @@ -161,7 +161,12 @@ get_phys_screen(Display *disp, int screen) void move_client_to_screen(Client *c, awesome_config *acf_new, Bool doresize) { - int old_screen = c->screen; + int i, old_screen = c->screen; + + /* if the client was focused on an old screen tag, remove it */ + for(i = 0; i < acf_new[old_screen - acf_new->screen].ntags; i++) + if(acf_new[old_screen - acf_new->screen].tags[i].client_sel == c) + acf_new[old_screen - acf_new->screen].tags[i].client_sel = NULL; /* tag client with new screen tags */ tag_client_with_current_selected(c, acf_new);