mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Fix closing of viewports (#3591)
This ensures the closed viewport gets a close-event, and that it and the parent viewport gets repainting, allowing the event to be registered.
This commit is contained in:
@@ -66,7 +66,7 @@ fn viewport_content(ui: &mut egui::Ui, ctx: &egui::Context, open: &mut bool) {
|
||||
}
|
||||
});
|
||||
|
||||
if ui.input(|i| i.viewport().close_requested) {
|
||||
if ui.input(|i| i.viewport().close_requested()) {
|
||||
*open = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user