Skip to content

Fix race condition in Wayland initialization#126

Open
KeithKirenai wants to merge 1 commit into
GhostNaN:masterfrom
KeithKirenai:fix-wayfire-race-condition
Open

Fix race condition in Wayland initialization#126
KeithKirenai wants to merge 1 commit into
GhostNaN:masterfrom
KeithKirenai:fix-wayfire-race-condition

Conversation

@KeithKirenai

Copy link
Copy Markdown

This commit defers EGL and MPV initialization until the first valid (W>0, H>0) configure event is received from the compositor.

This fixes EGL_BAD_NATIVE_WINDOW errors in environments like Wayfire that initially send 0x0 dimensions for the layer surface.

The initialization of EGL display, MPV context, and event threads is now guarded to ensure it only happens once across all outputs.

This commit defers EGL and MPV initialization until the first valid
(W>0, H>0) configure event is received from the compositor.

This fixes EGL_BAD_NATIVE_WINDOW errors in environments like Wayfire
that initially send 0x0 dimensions for the layer surface.

The initialization of EGL display, MPV context, and event threads is now
guarded to ensure it only happens once across all outputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant