You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by BernhardLThomas February 15, 2024
Hello, I've been playing around with winit and wgpu recently and I encountered an issue causing me to no longer receive WindowEvent::RedrawRequested events in the event loop.
Specifically this seems to happen as soon as I pass a reference to the Window to the Instance::create_surface method to create a surface.
I'm on MacOS with the current stable toolchain (1.76.0)
The following is a minimal example which causes the issue:
fnmain(){let event_loop = winit::event_loop::EventLoop::new().unwrap();let window = winit::window::Window::new(&event_loop).unwrap();let instance = wgpu::Instance::new(wgpu::InstanceDescriptor{
..Default::default()});// this line causes the issuelet surface = instance.create_surface(window).unwrap();
event_loop.run(|event, elwt| match event {
winit::event::Event::WindowEvent{ window_id, event } => match event {
winit::event::WindowEvent::CloseRequested => elwt.exit(),
winit::event::WindowEvent::Resized(size) => {println!("resize: {:?}", size);}
winit::event::WindowEvent::RedrawRequested => {println!("redraw_requested");}
_ => (),},
_ => (),});}
Originally posted by BernhardLThomas February 15, 2024
I should clarify, manually calling Window::request_redraw will still result in a WindowEvent::RedrawRequested. What I'm not receiving is redraw requests when resizing the window or similar.
The text was updated successfully, but these errors were encountered:
Discussed in #3494
Originally posted by BernhardLThomas February 15, 2024
Hello, I've been playing around with winit and wgpu recently and I encountered an issue causing me to no longer receive
WindowEvent::RedrawRequested
events in the event loop.Specifically this seems to happen as soon as I pass a reference to the Window to the
Instance::create_surface
method to create a surface.I'm on MacOS with the current stable toolchain (1.76.0)
The following is a minimal example which causes the issue:
Originally posted by BernhardLThomas February 15, 2024
I should clarify, manually calling Window::request_redraw will still result in a
WindowEvent::RedrawRequested
. What I'm not receiving is redraw requests when resizing the window or similar.The text was updated successfully, but these errors were encountered: