wayland: committing resized buffer is delayed
Closed this issue · 1 comments
vyivel commented
As far as I understand, this is what happens on window resize:
- A compositor sends a configure event, saving its serial number and waiting.
- imv receives the event and calls
wl_egl_window_resize()
. However, this call has no effect yet, aseglSwapBuffers()
hasn't been called. - imv pushes a resize event to its own event queue.
- imv acks the configure with the old buffer size.
- The compositor receives an
ack_configure
request with the saved serial number, but imv's size wasn't updated. - imv handles its own resize event, redraws, calls
eglSwapBuffers()
and commits a new buffer with a new size. - The compositor receives a commit with an unexpected size change.
Instead, imv should redraw right after calling wl_egl_window_resize()
. Calling eglSwapBuffers()
in toplevel_configure()
fixes the problem, while unsurprisingly introducing rendering issues.
vyivel commented
Nevermind, this issue seems to be present with every(?) program that uses EGL for rendering (e.g. weston-simple-egl
).