Not receiving WindowEvent::RedrawRequested after using Window to create Surface with WGPU #3494
-
Hello, I've been playing around with winit and wgpu recently and I encountered an issue causing me to no longer receive Specifically this seems to happen as soon as I pass a reference to the Window to the I'm on MacOS with the current stable toolchain (1.76.0) The following is a minimal example which causes the issue: fn main() {
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 issue
let 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");
}
_ => (),
},
_ => (),
});
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I should clarify, manually calling Window::request_redraw will still result in a |
Beta Was this translation helpful? Give feedback.
-
This was an issue in WGPU, and has been fixed in gfx-rs/wgpu#6107 |
Beta Was this translation helpful? Give feedback.
This was an issue in WGPU, and has been fixed in gfx-rs/wgpu#6107