When window is created in the Fullscreen::Borderless mode setting control_flow to ControloFlow::Exit does not exit the event loop:
use winit::{
event_loop::{ControlFlow, EventLoop},
window::{Fullscreen, WindowBuilder},
};
fn main() {
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_fullscreen(Some(Fullscreen::Borderless(None)))
.build(&event_loop)
.unwrap();
event_loop.run(move |_, _, control_flow| {
*control_flow = ControlFlow::Exit;
});
}
Commenting out the .with_fullscreen(...) line does correctly exit the event loop.
Reproduced on:
winit 0.26.1
rustc 1.60.0
MacOS 12.3.1
MacBook Pro M1
When window is created in the
Fullscreen::Borderlessmode settingcontrol_flowtoControloFlow::Exitdoes not exit the event loop:Commenting out the
.with_fullscreen(...)line does correctly exit the event loop.Reproduced on:
winit 0.26.1rustc 1.60.0MacOS 12.3.1MacBook Pro M1