As far as I understand, this is what happens on window resize:
1) A compositor sends a configure event, saving its serial number and waiting.
2) imv receives the event and calls wl_egl_window_resize(). However, this call has no effect yet, as eglSwapBuffers() hasn't been called.
3) imv pushes a resize event to its own event queue.
4) imv acks the configure with the old buffer size.
5) The compositor receives an ack_configure request with the saved serial number, but imv's size wasn't updated.
6) imv handles its own resize event, redraws, calls eglSwapBuffers() and commits a new buffer with a new size.
7) 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.
As far as I understand, this is what happens on window resize: 1) A compositor sends a configure event, saving its serial number and waiting. 2) imv receives the event and calls
wl_egl_window_resize()
. However, this call has no effect yet, aseglSwapBuffers()
hasn't been called. 3) imv pushes a resize event to its own event queue. 4) imv acks the configure with the old buffer size. 5) The compositor receives anack_configure
request with the saved serial number, but imv's size wasn't updated. 6) imv handles its own resize event, redraws, callseglSwapBuffers()
and commits a new buffer with a new size. 7) The compositor receives a commit with an unexpected size change.Instead, imv should redraw right after calling
wl_egl_window_resize()
. CallingeglSwapBuffers()
intoplevel_configure()
fixes the problem, while unsurprisingly introducing rendering issues.