[hackers] [wmii] Fix frame coloring issue which occurs with bloated apps.

From: Kris Maglione <jg_AT_suckless.org>
Date: Wed Feb 21 01:05:24 2007

changeset: 1917:039612aded00
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Feb 20 19:02:34 2007 -0500
summary: Fix frame coloring issue which occurs with bloated apps.

diff -r b6ac1ecb0246 -r 039612aded00 event.c
--- a/event.c Tue Feb 20 18:29:16 2007 -0500
+++ b/event.c Tue Feb 20 19:02:34 2007 -0500
@@ -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);
Received on Wed Feb 21 2007 - 01:05:24 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:34 UTC