From fbccd3a1a2c21a654ffde902b04b76d90eb8c679 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sun, 26 Nov 2023 17:37:03 -0500 Subject: [PATCH] Don't treat 'WindowEvent::CloseRequested' as consumed in egui-winit (#3627) This appears to have been 'consumed' by the viewport changes at one point (by updating `viewport_info`), but this is no longer the case. We should avoid marking this as 'consumed', so that applications know to continue processing this event after passing it to egui. --- crates/egui-winit/src/lib.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/egui-winit/src/lib.rs b/crates/egui-winit/src/lib.rs index 9c43ecb1..435ece8d 100644 --- a/crates/egui-winit/src/lib.rs +++ b/crates/egui-winit/src/lib.rs @@ -427,18 +427,14 @@ impl State { } // Things that may require repaint: - WindowEvent::CloseRequested => EventResponse { - consumed: true, - repaint: true, - }, - WindowEvent::CursorEntered { .. } | WindowEvent::Destroyed | WindowEvent::Occluded(_) | WindowEvent::Resized(_) | WindowEvent::Moved(_) | WindowEvent::ThemeChanged(_) - | WindowEvent::TouchpadPressure { .. } => EventResponse { + | WindowEvent::TouchpadPressure { .. } + | WindowEvent::CloseRequested => EventResponse { repaint: true, consumed: false, },