DestroyNotify
The X11 event delivered when a window has been destroyed, with CreateNotify as its counterpart at the other end of the window's life.
XDestroyWindow tears down not just the window but its whole subtree, and DestroyNotify is delivered inside out: children first, parent last. Most windows are never destroyed explicitly, though. When a client's connection closes the server cleans up everything it created, unless the client asked otherwise with SetCloseDownMode, and the same events go out. A parent with SubstructureNotifyMask also receives a CreateNotify whenever a child is created.
For a window manager, DestroyNotify is the cue to dismantle the frame it built around the client. The timing is treacherous: by the time the event arrives the window is gone, and any call still referring to it earns a BadWindow. Error handlers that quietly swallow exactly that error are therefore close to mandatory in window manager code — clients die when they please, not when it suits you.