Mathematica 7 and 8, probably plenty of other versions, and maybe even some other retarded clients, send UnmapNotify events for their help windows right after they get created. dwm then forgets about the window and it's a huge pain in the ass to work with. Don't ask me why, I'm not drunk and stoned enough to be able to think like Mathematica devs. But I have a simple patch attached, which ignores all UnmapNotify events that don't come from the server.
--Valentin
diff -r 131d4f6a8a1e dwm.c --- a/dwm.c Fri Jul 29 20:01:22 2011 +0200 +++ b/dwm.c Mon Aug 08 05:21:44 2011 +0200 @@ -1761,7 +1761,7 @@ Client *c; XUnmapEvent *ev = &e->xunmap; - if((c = wintoclient(ev->window))) + if((c = wintoclient(ev->window)) && !ev->send_event) unmanage(c, False); }