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:
zu1k
2021-09-28 17:34:58 +02:00
committed by GitHub
co-authored by Emil Ernerfeldt
parent 1b36863248
commit f6fb4d942a
4 changed files with 24 additions and 0 deletions
+5
View File
@@ -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 {