forge
Explore
Log in

Don't you dare go Hollow

tty: Guard against output disappearing immediately after connection

Browse files at this commit

289ae3604d705cebc82cbcd23ee4534ded16d3afIvan MolodetskikhParent: 55fb885
Fixes https://github.com/YaLTeR/niri/issues/739
src/backend/tty.rsmodified+3 -0
@@ -1061,7 +1061,10 @@ impl Tty {
1061 if niri.monitors_active {1061 if niri.monitors_active {
1062 // Redraw the new monitor.1062 // Redraw the new monitor.
1063 niri.event_loop.insert_idle(move |state| {1063 niri.event_loop.insert_idle(move |state| {
1064+ // Guard against output disconnecting before the idle has a chance to run.
1065+ if state.niri.output_state.contains_key(&output) {
1064 state.niri.queue_redraw(&output);1066 state.niri.queue_redraw(&output);
1067+ }
1065 });1068 });
1066 }1069 }
1067 1070