Replies: 2 comments 3 replies
-
So I found ui.ctx().send_viewport_cmd(ViewportCommand::Close); However, this doesn't really close the window. It remains open and visible for as long as the process continues to run. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found that if you do this within ctx.send_viewport_cmd(egui::ViewportCommand::Close); But if you do this, it efficiently closes the window: let ctx = ctx.clone();
std::thread::spawn(move || {
ctx.send_viewport_cmd(egui::ViewportCommand::Close);
}); But this behaviour is not documented currently |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It appears that there used to be a "close" function in eframe::Frame, but that appears to be gone in 0.26.2. What is the correct way to ask for the window to be closed now? I might be missing something
Beta Was this translation helpful? Give feedback.
All reactions