If for some reason the compositor is not able to handle a buffer
before the next one arrives, the buffer would be locked forever.
This change detects that case, and adds an "emergency release", and
displays a warning.
void attach(struct wl_buffer *buffer) {
bool emitMap = !surfaceBuffer;
+ if (surfaceBuffer && ! textureCreatedForBuffer) {
+ qWarning() << "### WaylandSurface::attach() releasing undisplayed buffer ###";
+ wl_client_post_event(client,&surfaceBuffer->resource.object,WL_BUFFER_RELEASE);
+ }
surfaceBuffer = buffer;
surfaceType = WaylandSurface::Invalid;
textureCreatedForBuffer = false;