Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window not destroyed on exit on windows #3811

Open
floriankramer opened this issue Jan 12, 2024 · 3 comments
Open

Window not destroyed on exit on windows #3811

floriankramer opened this issue Jan 12, 2024 · 3 comments
Labels
bug Something is broken eframe Relates to epi and eframe native-windows Running on native Windows OS

Comments

@floriankramer
Copy link

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 floriankramer added the bug Something is broken label Jan 12, 2024
@emilk emilk added eframe Relates to epi and eframe native-windows Running on native Windows OS labels Jan 14, 2024
@rustbasic
Copy link
Contributor

@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?

@floriankramer
Copy link
Author

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.

@rustbasic
Copy link
Contributor

@floriankramer

Can you apply Pull Request #4071 and check if it works as desired, and let me know the results?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken eframe Relates to epi and eframe native-windows Running on native Windows OS
Projects
None yet
3 participants