diff options
author | emersion <contact@emersion.fr> | 2018-09-28 10:00:40 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-09-28 10:00:40 +0200 |
commit | 79dd9ba15170f7054523fc37e10ea564661d648e (patch) | |
tree | 1292835a18abaa6230c048afbfaf8d907d135693 /include | |
parent | 19f3804548a37582f65cb4279545564dad0ec0d1 (diff) |
backend/drm: don't free connector immediately
When a pageflip is pending, we'll get a DRM event for the connector
in the future. We don't want to free the connector immediately
otherwise we'll use-after-free in the pageflip handler.
This commit adds a new state, "DISAPPEARED". This asks the pageflip
handler to destroy the output after it's done pageflipping.
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/drm/drm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h index ac23cd9a..3b01b64f 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm/drm.h @@ -104,10 +104,14 @@ struct wlr_drm_backend { }; enum wlr_drm_connector_state { + // Connector is available but no output is plugged in WLR_DRM_CONN_DISCONNECTED, + // An output just has been plugged in and is waiting for a modeset WLR_DRM_CONN_NEEDS_MODESET, WLR_DRM_CONN_CLEANUP, WLR_DRM_CONN_CONNECTED, + // Connector disappeared, waiting for being destroyed on next page-flip + WLR_DRM_CONN_DISAPPEARED, }; struct wlr_drm_mode { |