diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-06 20:04:29 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-06 20:04:29 +0100 |
commit | 44ef37bca0aa633f8c59d849946faf2319c5446b (patch) | |
tree | dbfcb7104dc6621cb766148ab2289d32d5f261e0 /client/src/window.rs | |
parent | 6af8b165fe8cbab35721a8797ca85cda454a5ff4 (diff) | |
download | weareserver-44ef37bca0aa633f8c59d849946faf2319c5446b.tar weareserver-44ef37bca0aa633f8c59d849946faf2319c5446b.tar.bz2 weareserver-44ef37bca0aa633f8c59d849946faf2319c5446b.tar.zst |
a
Diffstat (limited to 'client/src/window.rs')
-rw-r--r-- | client/src/window.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/window.rs b/client/src/window.rs index 2219bbc..2430479 100644 --- a/client/src/window.rs +++ b/client/src/window.rs @@ -38,12 +38,15 @@ impl ApplicationHandler for WindowState { _window_id: WindowId, event: WindowEvent, ) { - if let Some((_win, sta)) = &mut self.window { + if let Some((win, sta)) = &mut self.window { match event { WindowEvent::Resized(size) => { sta.renderer.resize(size.width, size.height); } - WindowEvent::RedrawRequested => sta.renderer.draw(&sta.tree).unwrap(), + WindowEvent::RedrawRequested => { + sta.draw(); + win.request_redraw(); + } WindowEvent::CloseRequested => { event_loop.exit(); } @@ -54,7 +57,7 @@ impl ApplicationHandler for WindowState { fn about_to_wait(&mut self, _event_loop: &ActiveEventLoop) { if let Some((_win, sta)) = &mut self.window { if let Err(e) = sta.update() { - warn!("update failed: {e}") + warn!("update failed: {e:#}") } } } |