diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2020-12-06 21:27:45 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-12-07 10:39:29 +0100 |
commit | 54b7ca56c06c0a9a658b5aea06605b964e66ca81 (patch) | |
tree | 88efeb7c0cc02959f1764b6a6c6d5d3e9da06049 | |
parent | 37cb3eb8ddbc264560757d538fe6710ac8784721 (diff) |
drm: do not unset make/model before emitting destroy event
-rw-r--r-- | backend/drm/drm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 7c88fd9e..6c420b10 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1615,10 +1615,6 @@ static void drm_connector_cleanup(struct wlr_drm_connector *conn) { conn->output.enabled = false; conn->output.width = conn->output.height = conn->output.refresh = 0; - memset(&conn->output.make, 0, sizeof(conn->output.make)); - 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; @@ -1635,6 +1631,10 @@ static void drm_connector_cleanup(struct wlr_drm_connector *conn) { conn->desired_mode = NULL; conn->pageflip_pending = false; wlr_signal_emit_safe(&conn->output.events.destroy, &conn->output); + + memset(&conn->output.make, 0, sizeof(conn->output.make)); + memset(&conn->output.model, 0, sizeof(conn->output.model)); + memset(&conn->output.serial, 0, sizeof(conn->output.serial)); break; case WLR_DRM_CONN_DISCONNECTED: break; |