forge
Explore
Log in

Don't you dare go Hollow

winit: Don't remove output on CloseRequested

Browse files at this commit

64c85d865ed4e5b97e8941135c742fd390738c50Ivan MolodetskikhParent: 367e495
More winit events can process after CloseRequested, which will cause a
panic if trying to access the now-removed output.
src/backend/winit.rsmodified+1 -4
@@ -107,10 +107,7 @@ impl Winit {
107107 WinitEvent::Redraw => state
108108 .niri
109109 .queue_redraw(state.backend.winit().output.clone()),
110- WinitEvent::CloseRequested => {
111- state.niri.stop_signal.stop();
112- state.niri.remove_output(&state.backend.winit().output);
113- }
110+ WinitEvent::CloseRequested => state.niri.stop_signal.stop(),
114111 })
115112 .unwrap();
116113