diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-06-13 03:41:59 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-06-13 03:41:59 +0000 |
commit | b53b4967e0112e46ea9b7ef5805fd789f31a7526 (patch) | |
tree | e4fd525da45585b3f0fe0e51f225105561ac0c00 | |
parent | 498399aec0e2e5f78b8aa689fd9ef072a65c8d91 (diff) |
Don't client_delete() on an Unmap event, only do that on a client delete event.
found by (among others) todd@ when you have a lot of clients and do something
that maps and umaps a lot of windows fast.
Debugged with aid of gdb, todd, okan and NULL pointers in a pizza place in
edmonton while waiting an inordinately long time for food.
ok okan@, todd@
-rw-r--r-- | app/cwm/xevents.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c index 99bf5b596..926cdc3d6 100644 --- a/app/cwm/xevents.c +++ b/app/cwm/xevents.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: xevents.c,v 1.17 2008/06/12 05:01:13 okan Exp $ + * $Id: xevents.c,v 1.18 2008/06/13 03:41:58 oga Exp $ */ /* @@ -68,21 +68,9 @@ xev_handle_unmapnotify(struct xevent *xev, XEvent *ee) { XUnmapEvent *e = &ee->xunmap; struct client_ctx *cc; - struct screen_ctx *sc; - int wascurrent; - - if ((cc = client_find(e->window)) != NULL) { - sc = CCTOSC(cc); - wascurrent = cc == client_current(); - client_delete(cc, e->send_event, 0); -#ifdef notyet - /* XXX disable the ptrwarp until we handle it - * better. */ - if (!client_delete(cc, e->send_event, 0) && wascurrent) - ;/* client_ptrwarp(new_cc); */ -#endif - } + if ((cc = client_find(e->window)) != NULL) + xu_setstate(cc, WithdrawnState); xev_register(xev); } |