1
0
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:
Emil Ernerfeldt
2023-11-20 17:43:40 +01:00
committed by GitHub
parent 7bfaf49636
commit 44ff29b012
11 changed files with 139 additions and 96 deletions

View File

@@ -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;
}
}