Skip to content

gl: wayland: Fix hiding the window on close()

When the window is called, we properly destroy all surfaces, which effectively will unmap that surface and should make it disapear on screen, but we also destroy the wl_source, a GSource that is resposibble of dispatching and executing messages to/from the Wayland server.

As a side effect, the server never gets the message and the surfaces are "leaked" on the server. We fix this using wl_display_flush() before destroying the wl_source.

cc @ystreet I hope this isn't too hacky, seems to work here. I believe this is not entirely correct, all other video sink we have in fact will close the window when doing from PAUSED to READY, not sure why glimagesink does that in READY to NULL, this likely needs some discussion and a separate issue.

Fixes #815 (closed)

Edited by Nicolas Dufresne

Merge request reports