forge
Explore
Log in

Don't you dare go Hollow

input: Intercept Enter key when confirming the exit dialog

Browse files at this commit

7b18ff8870c2610b3d532afef81a387a7a3f21d3Ivan MolodetskikhParent: 5246e2f
src/input/mod.rsmodified+4 -0
@@ -380,6 +380,10 @@ impl State {
380 if dialog.is_open() && pressed && raw == Some(Keysym::Return) {380 if dialog.is_open() && pressed && raw == Some(Keysym::Return) {
381 info!("quitting after confirming exit dialog");381 info!("quitting after confirming exit dialog");
382 this.niri.stop_signal.stop();382 this.niri.stop_signal.stop();
383+
384+ // Don't send this Enter press to any clients.
385+ this.niri.suppressed_keys.insert(key_code);
386+ return FilterResult::Intercept(None);
383 }387 }
384 }388 }
385 389