-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
eframe: several windows in series #1919
Conversation
I add the following code to the start of GlowWinitApp.on_event() func, and found the second and third window receive some events which are not belong to them. if window_id != self.window().id() {
println!("{event:?}");
println!("window_id mismatch !");
return EventResult::Wait;
}
|
Ignoring events to the wrong window seems like a good idea, so I added that. The extra call to Does it now work as expected on Windows? |
Yes, it works. 20220815_220324.mp4 |
Well, that's nice! On Mac I get |
Since #1919 we can continue the application after closing the native window. It therefore makes more sense to call `frame.close()` to close the native window, instead of `frame.quit()`.
Since #1919 we can continue the application after closing the native window. It therefore makes more sense to call `frame.close()` to close the native window, instead of `frame.quit()`.
Part of #1918
This attempts to allow opening several eframe windows after each other (one at the time).
Try it out with
cargo run -p serial_windows
.This works on Windows (thanks to @zu1k), but on Mac I get
winit::event::Event::LoopDestroyed
right away for the second window, and then the even loops closes.