mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40: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:
@@ -449,13 +449,14 @@ impl EpiIntegration {
|
||||
event: &winit::event::WindowEvent<'_>,
|
||||
window_id: &winit::window::WindowId,
|
||||
egui_winit: &mut egui_winit::State,
|
||||
viewport_id: u64,
|
||||
) -> EventResponse {
|
||||
use winit::event::{ElementState, MouseButton, WindowEvent};
|
||||
|
||||
match event {
|
||||
WindowEvent::CloseRequested => {
|
||||
log::debug!("Received WindowEvent::CloseRequested");
|
||||
self.close = app.on_close_event();
|
||||
self.close = app.on_close_event() && viewport_id == 0;
|
||||
log::debug!("App::on_close_event returned {}", self.close);
|
||||
}
|
||||
WindowEvent::Destroyed => {
|
||||
|
||||
Reference in New Issue
Block a user