aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-07 12:04:14 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-12 15:12:22 +0200
commit9412d34e2dc1d8b034e117950ede1424dc0f243c (patch)
treec2ee567ce2f09bd85e6b308da2b8e0a874776b1b /backend/drm
parentda4df82532fd992aa1cf13cd1fb6f34ff6bb3ea2 (diff)
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
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index b4d25e1d..743cc291 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -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;
}