Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland.c:
{ TRACE("interface=%s version=%u id=%u\n", interface, version, id);
+ /* For now only the desktop process needs wl_output objects. */ + if (GetCurrentProcessId() != get_desktop_process_id()) return; I think this should be `GetCurrentThreadId() != NtUserGetWindowThread( NtUserGetDesktopWindow(), NULL )` instead.
However I see that you're running this directly from `wayland_process_init`, which happens very early, and, in the desktop initialization, runs before the desktop window has actually been created. You'll probably get a HWND for it, but NtUserGetWindowThread returns nothing yet. You're working around it in `get_desktop_process_id` by returning `GetCurrentProcessId()` in case things failed, but that looks wrong imho, and instead you should probably try to make this work without having to guess the desktop process id. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2476#note_29755