mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
epi: drag native window (#728)
* feat: drag window * Update epi/src/lib.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * Update egui_demo_lib/src/backend_panel.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * cargo fmt Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -328,6 +328,7 @@ pub fn run(mut app: Box<dyn epi::App>, native_options: &epi::NativeOptions) {
|
||||
quit,
|
||||
window_size,
|
||||
decorated,
|
||||
drag_window,
|
||||
} = app_output;
|
||||
|
||||
if let Some(decorated) = decorated {
|
||||
@@ -344,6 +345,10 @@ pub fn run(mut app: Box<dyn epi::App>, native_options: &epi::NativeOptions) {
|
||||
);
|
||||
}
|
||||
|
||||
if drag_window {
|
||||
let _ = display.gl_window().window().drag_window();
|
||||
}
|
||||
|
||||
if quit {
|
||||
running = false;
|
||||
} else if needs_repaint {
|
||||
|
||||
Reference in New Issue
Block a user