summaryrefslogtreecommitdiff
path: root/client/src/window.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-05 23:24:57 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-05 23:24:57 +0100
commit1c0c8f788c8125c90a097e5241b5e8fe2518d1d2 (patch)
treeb5542fe00a472b5d5a8bcdd17fb3a34b75ad1dd0 /client/src/window.rs
parente15b39b2a9cf028b12cbe98f56674e58c5a6bd4c (diff)
downloadweareserver-1c0c8f788c8125c90a097e5241b5e8fe2518d1d2.tar
weareserver-1c0c8f788c8125c90a097e5241b5e8fe2518d1d2.tar.bz2
weareserver-1c0c8f788c8125c90a097e5241b5e8fe2518d1d2.tar.zst
a
Diffstat (limited to 'client/src/window.rs')
-rw-r--r--client/src/window.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/window.rs b/client/src/window.rs
index 5f2e7f8..2219bbc 100644
--- a/client/src/window.rs
+++ b/client/src/window.rs
@@ -43,7 +43,7 @@ impl ApplicationHandler for WindowState {
WindowEvent::Resized(size) => {
sta.renderer.resize(size.width, size.height);
}
- WindowEvent::RedrawRequested => sta.renderer.draw().unwrap(),
+ WindowEvent::RedrawRequested => sta.renderer.draw(&sta.tree).unwrap(),
WindowEvent::CloseRequested => {
event_loop.exit();
}
@@ -59,3 +59,12 @@ impl ApplicationHandler for WindowState {
}
}
}
+
+impl Drop for WindowState {
+ fn drop(&mut self) {
+ if let Some((win, sta)) = self.window.take() {
+ drop(sta);
+ drop(win)
+ }
+ }
+}