I've been messing around with Glium, and can't seem to process window events correctly. Clicking the 'X' in the window seems to freeze the process (the frame isn't drawn, or any calculations processed while held), rather than closing the window. I'm also trying to process keyboard inputs, but the event loop doesn't seem to recognize them either. Event handling loop is below:
// Event Handling
match event {
glutin::event::Event::WindowEvent { event, .. } => match event {
glutin::event::WindowEvent::CloseRequested => {
*control_flow = glutin::event_loop::ControlFlow::Exit;
return;
},
glutin::event::WindowEvent::KeyboardInput {
input:
glutin::event::KeyboardInput {
virtual_keycode: Some(VirtualKeyCode::Left),
..
},
..
} => println!("LEFT"),
_ => return,
},
glutin::event::Event::NewEvents(cause) => match cause {
glutin::event::StartCause::ResumeTimeReached { .. } => (),
glutin::event::StartCause::Init => (),
_ => return,
},
_ => return,
}
glium version is 0.31.0, OS is Win11, if that helps.
Any help would be appreciated, thanks!