mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 19:08:28 +00:00
Exit when window is closed
This commit is contained in:
parent
2b5403530a
commit
aa61ee52fe
@ -41,7 +41,7 @@ impl ApplicationHandler for App {
|
|||||||
|
|
||||||
fn window_event(
|
fn window_event(
|
||||||
&mut self,
|
&mut self,
|
||||||
_: &ActiveEventLoop,
|
event_loop: &ActiveEventLoop,
|
||||||
_: WindowId,
|
_: WindowId,
|
||||||
event: WindowEvent,
|
event: WindowEvent,
|
||||||
) {
|
) {
|
||||||
@ -50,6 +50,9 @@ impl ApplicationHandler for App {
|
|||||||
};
|
};
|
||||||
|
|
||||||
match event {
|
match event {
|
||||||
|
WindowEvent::CloseRequested => {
|
||||||
|
event_loop.exit();
|
||||||
|
}
|
||||||
WindowEvent::RedrawRequested => {
|
WindowEvent::RedrawRequested => {
|
||||||
renderer.render();
|
renderer.render();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user