Replies: 2 comments 2 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.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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