diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-10-20 20:15:28 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-10-20 20:18:56 +0300 |
| commit | 289ae3604d705cebc82cbcd23ee4534ded16d3af (patch) | |
| tree | 059e762859653fbd7c9eddc0094c4671cbdfd7db /src | |
| parent | 55fb885256aac6aaf0c3fd645a9c9511f107d5fd (diff) | |
| download | niri-289ae3604d705cebc82cbcd23ee4534ded16d3af.tar.gz niri-289ae3604d705cebc82cbcd23ee4534ded16d3af.tar.bz2 niri-289ae3604d705cebc82cbcd23ee4534ded16d3af.zip | |
tty: Guard against output disappearing immediately after connection
Fixes https://github.com/YaLTeR/niri/issues/739
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/tty.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs index 439270a9..58face27 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -1061,7 +1061,10 @@ impl Tty { if niri.monitors_active { // Redraw the new monitor. niri.event_loop.insert_idle(move |state| { - state.niri.queue_redraw(&output); + // Guard against output disconnecting before the idle has a chance to run. + if state.niri.output_state.contains_key(&output) { + state.niri.queue_redraw(&output); + } }); } |
