Implement ApplicationHandler for DisplayState

This commit is contained in:
Hanno Braun 2024-05-06 14:12:45 +02:00
parent c61c73e99a
commit 88d0395a76

View File

@ -5,6 +5,7 @@ use fj_viewer::{
}; };
use futures::executor::block_on; use futures::executor::block_on;
use winit::{ use winit::{
application::ApplicationHandler,
dpi::PhysicalPosition, dpi::PhysicalPosition,
error::EventLoopError, error::EventLoopError,
event::{ event::{
@ -74,7 +75,9 @@ struct DisplayState {
stop_drawing: bool, stop_drawing: bool,
} }
impl DisplayState { impl ApplicationHandler for DisplayState {
fn resumed(&mut self, _: &ActiveEventLoop) {}
fn window_event( fn window_event(
&mut self, &mut self,
event_loop: &ActiveEventLoop, event_loop: &ActiveEventLoop,