Commit 30a01cd9 authored by Carlos Garnacho's avatar Carlos Garnacho

wayland/egl: Ensure EGL surface is resized on DRI update_buffers()

Fullscreening and unfullscreening a totem window while playing a video
sometimes results in the video subsurface not changing size along. This
is also reproducible with epiphany.

If a surface gets resized while we have an active back buffer for it, the
resized dimensions won't get neither immediately applied on the resize
callback, nor correctly synchronized on update_buffers(), as the
(now stale) surface size and currently attached buffer size still do match.

There's actually 2 things to synchronize here, first the surface query
size might not be updated yet to the wl_egl_window's (i.e. resize_callback
happened while there is a back buffer), and second the wayland buffers
would need dropping if new surface size differs with the currently attached
buffer. These are done in separate steps now.

Fixes: a9fb331e ("wayland/egl: update surface size on window resize")
Signed-off-by: Carlos Garnacho's avatarCarlos Garnacho <>
Reviewed-by: Juan Suárez Romero's avatarJuan A. Suarez <>
Reviewed-by: Daniel Stone's avatarDaniel Stone <>
Tested-by: Bastien Nocera's avatarBastien Nocera <>
Tested-by: default avatarDenys Kostin <>
parent f5092136
Pipeline #20188 passed with stage
in 24 minutes and 56 seconds