wsi/wayland: Respect non-blocking AcquireNextImage
Quoting @daniels in the original patch:
This will still potentially block infinitely given a non-infinte timeout, but the fix for that is much more involved. If the client has requested that AcquireNextImage not block at all, with a timeout of 0, then don't make any non-blocking calls.
When asked why this hadn't landed, @daniels replied:
To be honest, I'm slightly apprehensive about merging it, given the open questions in https://bugs.freedesktop.org/show_bug.cgi?id=108540#c1 Getting some feedback from others would be great.
I think this is already an improvement over the current status, even if there are still improvements needed, so I'm re-sending it in the hopes that others agree :)
I also added the debug message I suggested, so that applications using unsupported timeout
s are told as much.
/cc @chadversary @jekstrand