1
0
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:
zu1k
2021-09-28 23:34:58 +08:00
committed by GitHub
parent 1b36863248
commit f6fb4d942a
4 changed files with 24 additions and 0 deletions

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 {