backend/drm: disable cursor in dealloc_crtc

dealloc_crtc was destroying GBM surfaces, but the cursor_enabled flag
was left as-is. When re-enabling the output, atomic_crtc_pageflip would
try enabling the cursor plane, but would fail because no framebuffer is
available.

Closes: https://github.com/swaywm/wlroots/issues/2150
This commit is contained in:
Simon Ser 2020-05-07 12:04:14 +02:00 committed by Drew DeVault
parent da4df82532
commit 9412d34e2d
1 changed files with 3 additions and 0 deletions

View File

@ -1119,6 +1119,9 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) {
enable_drm_connector(&conn->output, false);
drm_plane_finish_surface(conn->crtc->primary);
drm_plane_finish_surface(conn->crtc->cursor);
if (conn->crtc->cursor != NULL) {
conn->crtc->cursor->cursor_enabled = false;
}
conn->crtc = NULL;
}