Handle DestroyNotify and UnmapNotify