Hi! I am seeing some issues stemming from the optional attachment logic in the final commit. In particular the decision to attach or not is made at GL/VK surface creation time, and is never revisited after that (unless the GL/VK surface is recreated). A few games I tested (e.g., supertuxkart) also seem to create the GL/VK surface while the window is hidden (so client surface is not attached), so the contents are never displayed even when the window is eventually shown.
Taking a step back, what's the reason for detaching the client surface when the window is hidden? The compositor will handle this for us, not showing any subsurfaces if the parent surface is not mapped.