If the given window is a lock window, unmap the surface.
This must be called before the window is unmapped (e.g. hidden).