Skip to content

wsi/x11: Fix Xwayland regressions with IMMEDIATE/MAILBOX + wait_ready.

With the introduction of locks around the XCB polling mechanism, a possible deadlock was introduced.

If all 5 images were rapidly acquired and presented before the FIFO thread had the chance to submit a present, we would deadlock.

Before the lock however, it was still buggy since the two threads would race to poll events and update internal state.

The fix is to just ensure that there are pending presentation requests in flight, so that forward progress is guaranteed before we take the poll lock.

Also fixes timeout for locking acquire_next_image. Need similar consideration as WaitForPresentKHR here.

Closes #7770 (closed).

Merge request reports