[Backport to Xwayland 23.2] xwayland: Commit after acknowledging configure

When handling libdecor configure, we first update our xwl output and screen if dimensions differ from the current xwl_screen, and then commit a new libdecor frame which acknowledges the xdg_surface.configure event.

If the initial configure events contains non-zero dimensions, we will update the xwl output before acknowledging the initial configure. As we attach a buffer and commit the surface when updating the output, this leads to a protocol error.

Instead, move the surface commit till the end of the configure handler so it always happens after the ack.

Signed-off-by: Kenny Levinsen kl@kl.wtf (cherry picked from commit 295fb716)

Merge request reports