On Wed May 31 20:27:36 2023 +0000, Rémi Bernon wrote:
Unless there is a specific reason I'm not sure you want surface for every Win32 windows. I believe it is unnecessary and may cause more harm than good. Wine already handles compositing of child windows onto their parent surface (though there's possibly some tricks with cross-process rendering), and winex11 for instance only realize top-level windows into X11 windows.
`wl_surface` for child windows are not currently used, but will be when we want to enable rendering GL/Vulkan content into child windows. Although the existence of `wl_surface` doesn't really hurt at the moment (except in terms of unused wayland objects, but perhaps I am missing something?), I am fine explicitly not creating them for now, until the accelerated rendering use case becomes a reality.
Note that regardless of the existence or not of a `wl_surface`, the current code will composite all child windows into the parent as you describe (i.e., we always return a NULL `window_surface` for them).