git.lucas.co / cce-cloud
cloud storage client
git clone https://git.lucas.co/cce-cloud.git

commit8152ccf0a2d80123bd6c32ce7cb4bb6eac14a37f
parent97ef7842b1
authorLucas Galante <[email protected]>
date2026-05-25 00:18
Set KeyboardInteractivity::None and commit before exit, and implement Drop for State to destroy wl_surface

 src/main.rs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index 349cc3c..c375bb3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -773,6 +773,12 @@ impl State {
     }
 }
 
+impl Drop for State {
+    fn drop(&mut self) {
+        self.wl_surface.destroy();
+    }
+}
+
 #[allow(dead_code)]
 struct AppState {
     registry_state: RegistryState,
@@ -1254,6 +1260,10 @@ fn main() {
         }
     }
 
+    if let Some(state) = &mut app.state {
+        state.window.set_keyboard_interactivity(KeyboardInteractivity::None);
+        state.wl_surface.commit();
+    }
     drop(app);
     let _ = conn_clone.roundtrip();
 }