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+4 -1
@@ -1061,7 +1061,10 @@ impl Tty {
10611061 if niri.monitors_active {
10621062 // Redraw the new monitor.
10631063 niri.event_loop.insert_idle(move |state| {
1064- state.niri.queue_redraw(&output);
1064+ // Guard against output disconnecting before the idle has a chance to run.
1065+ if state.niri.output_state.contains_key(&output) {
1066+ state.niri.queue_redraw(&output);
1067+ }
10651068 });
10661069 }
10671070