mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
winit: don't explicitly handle Cmd-Q and Alt-F4 (#881)
Closes https://github.com/emilk/egui/issues/877 Still a problem: https://github.com/rust-windowing/winit/issues/1998
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use crate::*;
|
||||
use egui::Color32;
|
||||
#[cfg(target_os = "windows")]
|
||||
use glium::glutin::platform::windows::WindowBuilderExtWindows;
|
||||
use glium::glutin;
|
||||
|
||||
impl epi::TextureAllocator for Painter {
|
||||
fn alloc_srgba_premultiplied(
|
||||
|
||||
@@ -97,8 +97,6 @@ pub use epi_backend::{run, NativeOptions};
|
||||
|
||||
pub use egui_winit;
|
||||
|
||||
use glium::glutin;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// Convenience wrapper for using [`egui`] from a [`glium`] app.
|
||||
@@ -127,11 +125,6 @@ impl EguiGlium {
|
||||
self.egui_winit.on_event(&self.egui_ctx, event)
|
||||
}
|
||||
|
||||
/// Is this a close event or a Cmd-Q/Alt-F4 keyboard command?
|
||||
pub fn is_quit_event(&self, event: &glutin::event::WindowEvent<'_>) -> bool {
|
||||
self.egui_winit.is_quit_event(event)
|
||||
}
|
||||
|
||||
/// Returns `needs_repaint` and shapes to draw.
|
||||
pub fn run(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user