xdg-shell: Require a buffer and a wl_surface.commit for mapping a window
xdg-shell: Require a buffer and a wl_surface.commit for mapping a window

Require the client to have attached (either previously committed, or
newly) a buffer to the corresponding wl_surface, and that the window
will not be potentially mapped until calling wl_surface.commit after
having created the window. This is required to make valid double
buffered xdg_surface state possible when creating a window.

Currently there is no double buffered state in xdg_popup, but it should
behave the same as xdg_surface, and for making it future proof in case
we want to add double buffered state to xdg_popup.

Signed-off-by: Jonas Ådahl <67dcd8a17e758192e0cbb577ce1d62cc7da6cf49@gmail.com>
Acked-by: Pekka Paalanen <0f6ae7001e34c37b02fb2c1c2573ddf8f442136a@collabora.co.uk>

udoprog/weston,Tarnyko/weston-xdg_surface_present,kwm81/weston,sir-murray/weston,Fantu/compositor-spice,giucam/weston,Fantu/compositor-spice,xorgy/weston,sir-murray/weston,krezovic/weston,Gnurou/weston,mchalupa/weston,Fantu/compositor-spice,udoprog/weston,giucam/weston,eyolfson/weston,eyolfson/weston,krezovic/weston,mchalupa/weston,jonnylamb/weston,jonnylamb/weston,xorgy/weston,kwm81/weston,Gnurou/weston,Tarnyko/weston-xdg_surface_present