From 0339b6f64b34d7cfaaea0eb472219e78d852c122 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 15 Oct 2007 16:57:54 +0200 Subject: [PATCH] fix refresh of colborders --- client.c | 11 +++++++---- tab.c | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index 3a681e60..07ea6603 100644 --- a/client.c +++ b/client.c @@ -310,6 +310,13 @@ focus(Display *disp, Client * c, Bool selscreen, awesome_config *awesomeconf) XSetWindowBorder(awesomeconf->display, (*awesomeconf->client_sel)->win, awesomeconf->colors_normal[ColBorder].pixel); setclienttrans(*awesomeconf->client_sel, awesomeconf->opacity_unfocused); } + if(c) + { + if(c->tab.next || c->tab.prev) + XSetWindowBorder(awesomeconf->display, c->win, awesomeconf->colors_tab[ColBorder].pixel); + else + XSetWindowBorder(awesomeconf->display, c->win, awesomeconf->colors_selected[ColBorder].pixel); + } if(*awesomeconf->client_sel == c) return; if(c) @@ -320,10 +327,6 @@ focus(Display *disp, Client * c, Bool selscreen, awesome_config *awesomeconf) drawstatusbar(disp, awesomeconf); if(*awesomeconf->client_sel) { - if((*awesomeconf->client_sel)->tab.next || (*awesomeconf->client_sel)->tab.prev) - XSetWindowBorder(awesomeconf->display, (*awesomeconf->client_sel)->win, awesomeconf->colors_tab[ColBorder].pixel); - else - XSetWindowBorder(awesomeconf->display, (*awesomeconf->client_sel)->win, awesomeconf->colors_selected[ColBorder].pixel); XSetInputFocus(awesomeconf->display, (*awesomeconf->client_sel)->win, RevertToPointerRoot, CurrentTime); for(c = *awesomeconf->clients; c; c = c->next) if(c != *awesomeconf->client_sel) diff --git a/tab.c b/tab.c index 737a3c04..6a6146b2 100644 --- a/tab.c +++ b/tab.c @@ -62,6 +62,7 @@ uicb_tab(awesome_config *awesomeconf, c->tab.isvisible = False; arrange(awesomeconf->display, awesomeconf); } + focus(awesomeconf->display, sel, True, awesomeconf); } void @@ -92,6 +93,7 @@ uicb_untab(awesome_config *awesomeconf, sel->tab.prev = NULL; arrange(awesomeconf->display, awesomeconf); + focus(awesomeconf->display, sel, True, awesomeconf); } void