Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/window.c:
/* Otherwise ensure that we have a wayland surface. */ if (!surface && !(surface = wayland_surface_create(data->hwnd))) return;
- if (surface && surface->xdg_toplevel)
The text should be set just (and only) after creating a new toplevel, a few lines below:
``` if (visible) { wayland_surface_make_toplevel(surface); --> HERE <-- } ```
You also don't need to to check `surface` (it's always non-NULL at this point).