egui
egui copied to clipboard
Window not destroyed on exit on windows
Describe the bug On windows, when clicking the x in the titlebar the window isn't destroyed if the application doesn't exit. This seems similar to #2892. The window closes as expected on version 0.23.0 but fails on 0.25.0 (and also on the current master branch)
To Reproduce
Steps to reproduce the behavior:
In a loop open a window using eframe::run_native
with the default options on windows. Close the window. It will now persist until the next call to run_native (at that point the old window is destroyed and a new one created).
fn main() -> Result<()> {
loop {
let options = eframe::NativeOptions::default();
let _ = eframe::run_simple_native("test", options, |_cc, _frame| {});
std::thread::sleep(std::time::Duration::from_secs(5));
}
}
Desktop (please complete the following information):
- OS: Windows 11
@floriankramer
What is the intention of this?
Do you want the window to appear 5 seconds after it disappears? Do you want the window to not appear after 5 seconds?
I had an application with a tray icon that showed a window when the icon was clicked. When you close the window, the application should keep running (and displaying the tray icon), but the window should close. Instead, on the newer version of eframe the window stays around, but isn't updated anymore.
@floriankramer
Can you apply Pull Request #4071 and check if it works as desired, and let me know the results?