On Mon Jun 22 09:25:49 2026 +0000, Etaash Mathamsetty wrote:
Unfortunately, we do have to wait for all the globals to get registered at the least before we can proceed with the rest of the init code, and handling all the initial events is also required so that the ~~wl_keyboard and wl_pointer exist before process init~~ (edit: I thought about that a bit more and I don't think there are any problems with that. However, there could be problems with having dummy output information. I would rather avoid adding new problems). I'm in favor of using a condition variable, though, and we can potentially put a timeout on it in case the compositor misbehaves. Is the system thread stuff ready to be used on a driver like winewayland (can we use win32u with system threads)? I could add that into this patch as well if we are using a condition variable I don't know whether system threads can be used, but in any case we don't have the winewayland dispatch thread spawned at this point anyway.
What about doing something like: ``` while (wl_display_dispatch_queue_timeout( process_wayland.wl_display, process_wayland.wl_event_queue, &timeout ) != -1) if (process_wayland.initialized) break; ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11203#note_143827