commit 9fd22b12f92298b6c2fb6a5503bb54cae90ea7cd
parent 16cdf68c70b7813cf8d7d68e6023421f43be6cb4
Author: Kris Maglione <jg@suckless.org>
Date: Tue, 20 Feb 2007 19:02:34 -0500
Fix frame coloring issue which occurs with bloated apps.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/event.c b/event.c
@@ -288,7 +288,7 @@ unmapnotify(XEvent *e) {
static void
focusin(XEvent *e) {
- Client *c;
+ Client *c, *old;
XFocusChangeEvent *ev = &e->xfocus;
if(!((ev->detail == NotifyNonlinear)
@@ -300,6 +300,7 @@ focusin(XEvent *e) {
return;
c = client_of_win(ev->window);
+ old = screen->focus;
if(c) {
if(verbose) {
fprintf(stderr, "screen->focus: %p => %p\n", screen->focus, c);
@@ -312,6 +313,8 @@ focusin(XEvent *e) {
update_client_grab(c);
if(c->sel)
draw_frame(c->sel);
+ if(old && old->sel)
+ draw_frame(old->sel);
}else if(ev->window == screen->barwin) {
if(verbose) {
fprintf(stderr, "screen->focus: %p => %p\n", screen->focus, c);