aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tty.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-10-27 16:17:40 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-10-27 16:48:49 +0400
commit345428bce76281efeee91336768c2d38282f8027 (patch)
tree7465f9ccfe6f3b6cf133c23636bb9068bb9a30df /src/backend/tty.rs
parent64ac31668dfd89c9e700d683d8f4c1aae1728703 (diff)
downloadniri-345428bce76281efeee91336768c2d38282f8027.tar.gz
niri-345428bce76281efeee91336768c2d38282f8027.tar.bz2
niri-345428bce76281efeee91336768c2d38282f8027.zip
Drop `GbmDevice` in the end
The `GbmDevice` must be destroyed after destroying all the objects associated with it.
Diffstat (limited to 'src/backend/tty.rs')
-rw-r--r--src/backend/tty.rs6
1 files changed, 4 insertions, 2 deletions
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<DrmDeviceFd>,
gles: GlesRenderer,
formats: HashSet<DrmFormat>,
drm_scanner: DrmScanner,
surfaces: HashMap<crtc::Handle, Surface>,
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<DrmDeviceFd>,
}
#[derive(Debug, Clone, Copy)]