From 345428bce76281efeee91336768c2d38282f8027 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Fri, 27 Oct 2023 16:17:40 +0400 Subject: Drop `GbmDevice` in the end The `GbmDevice` must be destroyed after destroying all the objects associated with it. --- src/backend/tty.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/backend/tty.rs') diff --git a/src/backend/tty.rs b/src/backend/tty.rs index 2f2e7a90..5646e8d3 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -66,14 +66,16 @@ type GbmDrmCompositor = DrmCompositor< struct OutputDevice { id: dev_t, token: RegistrationToken, - drm: DrmDevice, - gbm: GbmDevice, gles: GlesRenderer, formats: HashSet, drm_scanner: DrmScanner, surfaces: HashMap, dmabuf_state: DmabufState, dmabuf_global: DmabufGlobal, + // SAFETY: drop after all the objects used with them are dropped. + // See https://github.com/Smithay/smithay/issues/1102. + drm: DrmDevice, + gbm: GbmDevice, } #[derive(Debug, Clone, Copy)] -- cgit