From e454b32cf147868c08b690a93763fa1b05a18b39 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sun, 12 May 2024 20:10:33 +0900 Subject: [PATCH] Update epi_integration.rs --- crates/eframe/src/native/epi_integration.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/crates/eframe/src/native/epi_integration.rs b/crates/eframe/src/native/epi_integration.rs index dcf86adb888..d6cdba01875 100644 --- a/crates/eframe/src/native/epi_integration.rs +++ b/crates/eframe/src/native/epi_integration.rs @@ -144,12 +144,10 @@ pub struct EpiIntegration { is_first_frame: bool, pub frame_start: Instant, pub egui_ctx: egui::Context, - // pending_full_output: egui::FullOutput, /// When set, it is time to close the native window. close: bool, - can_drag_window: bool, follow_system_theme: bool, #[cfg(feature = "persistence")] persist_window: bool, @@ -206,9 +204,7 @@ impl EpiIntegration { frame, last_auto_save: Instant::now(), egui_ctx, - // pending_full_output: Default::default(), close: false, - can_drag_window: false, follow_system_theme: native_options.follow_system_theme, #[cfg(feature = "persistence")] persist_window: native_options.persist_window, @@ -257,18 +253,13 @@ impl EpiIntegration { ) -> EventResponse { crate::profile_function!(egui_winit::short_window_event_description(event)); - use winit::event::{ElementState, MouseButton, WindowEvent}; + use winit::event::WindowEvent; match event { WindowEvent::Destroyed => { log::debug!("Received WindowEvent::Destroyed"); self.close = true; } - WindowEvent::MouseInput { - button: MouseButton::Left, - state: ElementState::Pressed, - .. - } => self.can_drag_window = true, WindowEvent::ThemeChanged(winit_theme) if self.follow_system_theme => { let theme = theme_from_winit_theme(*winit_theme); self.frame.info.system_theme = Some(theme);