On Mon Aug 12 08:32:34 2024 +0000, Alexandros Frantzis wrote:
The decision to instantiate (or not) the `data->wayland_surface` member is made in the `WindowPosChanged` driver callback which is called after `WindowPosChanging`. This means we can't rely on that member at this point to make a choice about the need for window surface. I think what is proposed in the MR may tend to work in many cases because the WindowPosChang* sequence is typically called multiple times, but the correct solution seems to me to revert to the previous check-if-window-is-child behavior.
I don't think it matter so much, mostly because it is exactly the same with other drivers, and now that I'm refactoring these interfaces for DPI scaling I prefer to see similar logic between them.
This could probably be factored and moved to win32u (as I incorrectly assumed it was already when I removed the checks): we already decide to use the parent window surface there, we should probably decide whether to create a host window or not there as well.