xwm: use _XWAYLAND_ALLOW_COMMITS

This patch uses the new feature proposed for Xwayland in the patch
series https://patchwork.freedesktop.org/series/16610/ .

When the frame window is created, immediately forbid Xwayland commits on
it. This prevents commits before the decorations have been drawn and the
initial pending state has been set. Commits are enabled right after
drawing and setting.

This ensures that the decorations are fully drawn when a window is
mapped. This also solves the initial commit/pending race, but the race
is on again after mapping.

If Xwayland does not implement the needed support, we are just setting a
window property with no effect.

This patch is the final piece for solving T7622, excluding the
_NET_WM_SYNC_REQUEST handling.

Task: https://phabricator.freedesktop.org/T7622
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
diff --git a/xwayland/xwayland.h b/xwayland/xwayland.h
index b1225f5..ca75f5b 100644
--- a/xwayland/xwayland.h
+++ b/xwayland/xwayland.h
@@ -154,6 +154,7 @@
 		xcb_atom_t		 xdnd_type_list;
 		xcb_atom_t		 xdnd_action_copy;
 		xcb_atom_t		 wl_surface_id;
+		xcb_atom_t		 allow_commits;
 	} atom;
 };