aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-01-28 16:30:29 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-01-28 16:30:29 +0400
commit64c85d865ed4e5b97e8941135c742fd390738c50 (patch)
tree79433afa193e902be363501e1b4502817ff8dba5 /src/backend
parent367e4955ea05044b0151e0a39ea7061788d73af9 (diff)
downloadniri-64c85d865ed4e5b97e8941135c742fd390738c50.tar.gz
niri-64c85d865ed4e5b97e8941135c742fd390738c50.tar.bz2
niri-64c85d865ed4e5b97e8941135c742fd390738c50.zip
winit: Don't remove output on CloseRequested
More winit events can process after CloseRequested, which will cause a panic if trying to access the now-removed output.
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/winit.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backend/winit.rs b/src/backend/winit.rs
index 3c4b9ad3..cd8ceafd 100644
--- a/src/backend/winit.rs
+++ b/src/backend/winit.rs
@@ -107,10 +107,7 @@ impl Winit {
WinitEvent::Redraw => state
.niri
.queue_redraw(state.backend.winit().output.clone()),
- WinitEvent::CloseRequested => {
- state.niri.stop_signal.stop();
- state.niri.remove_output(&state.backend.winit().output);
- }
+ WinitEvent::CloseRequested => state.niri.stop_signal.stop(),
})
.unwrap();