aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/drm.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-09 13:41:04 +0200
committerGitHub <noreply@github.com>2018-10-09 13:41:04 +0200
commit8488ed299745f05ad6445cb22006da20fe926891 (patch)
tree17818e4b74b7069d2df2aed9277f8cf932f878ee /backend/drm/drm.c
parentfeb0614d3238a52e3eed0beca41fd0694aa7d31e (diff)
parent46b1ba386f00dfef079b26326a011521026b5f59 (diff)
Merge pull request #1298 from emersion/output-dangling-idle-frame
output: remove idle_frame event source when destroying output
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r--backend/drm/drm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 5d589d4f..d6a7582c 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1347,6 +1347,13 @@ static void drm_connector_cleanup(struct wlr_drm_connector *conn) {
memset(&conn->output.model, 0, sizeof(conn->output.model));
memset(&conn->output.serial, 0, sizeof(conn->output.serial));
+ if (conn->output.idle_frame != NULL) {
+ wl_event_source_remove(conn->output.idle_frame);
+ conn->output.idle_frame = NULL;
+ }
+ conn->output.needs_swap = false;
+ conn->output.frame_pending = false;
+
conn->pageflip_pending = false;
/* Fallthrough */
case WLR_DRM_CONN_NEEDS_MODESET: