1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

Now a WindowEvent::CloseRequested is received will be sent to egui_winit::State in RawInput

Now when we press the close button from a native window if the window has a open variabile connected the window will be closed
This commit is contained in:
Konkitoman
2023-07-24 16:15:34 +03:00
parent 4d883b8217
commit f4a196cddc
6 changed files with 106 additions and 16 deletions

View File

@@ -372,8 +372,16 @@ impl State {
}
// Things that may require repaint:
WindowEvent::CloseRequested
| WindowEvent::CursorEntered { .. }
WindowEvent::CloseRequested => {
self.egui_input
.events
.push(egui::Event::WindowEvent(egui::WindowEvent::CloseRequested));
EventResponse {
consumed: true,
repaint: true,
}
}
WindowEvent::CursorEntered { .. }
| WindowEvent::Destroyed
| WindowEvent::Occluded(_)
| WindowEvent::Resized(_)