mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
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@
This commit is contained in:
parent
077173527b
commit
01eecac5d4
16
xevents.c
16
xevents.c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user