From 896a02580b69fcbc5116529d6828bb472bd9e657 Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Wed, 24 Jul 2024 21:54:14 -0400 Subject: [PATCH] wayland: surface: add function for releasing a buffer Releasing the current buffer has no major effect because the program is double-buffered, but add a function to release the buffer anyway. --- src/wayland/surface.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wayland/surface.rs b/src/wayland/surface.rs index bd64e6d..bf8bc3d 100644 --- a/src/wayland/surface.rs +++ b/src/wayland/surface.rs @@ -105,6 +105,11 @@ impl self.scale = scale; } + pub fn release(&mut self, id: u32) + { + self.bufs[id as usize].release(); + } + pub fn hide(&mut self) { self.configured = false;