Skip to content

relases gbm buffers on init

Simon Ser requested to merge github/fork/Ongy/drm-surface-buffers into master

Created by: Ongy

The wlr_drm_surface_init function is called (upon others) when the drm mode is changed. When the surface was used previously this replaced the gbm_surface, but did not replace the gbm buffers (front/back). With this, wlr_drm_surface_get_from never set up the new buffers with the new glViewport because surf->front existed.

This frees the buffers to get new buffers on the new surface with the new viewport.

This fixes https://github.com/swaywm/wlroots/issues/593

Testplan: I should rebase the test-code mentioned in the issue, then use that branch with the keybind.

Merge request reports