Synchronize wl_surface state before wl_surface_commit
The surface state being desynchronized caused various issues:
- Popups were misplaced
- Black border when resizing
- Initial position jump after showing
The Vulkan commit hasn't been tested; using the Vulkan renderer on my machine doesn't render properly at all.