aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-11 13:21:56 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-11 13:22:11 +0300
commit7b18ff8870c2610b3d532afef81a387a7a3f21d3 (patch)
tree3602fe97509bcc0fee9ce74694ab32d8d7307157
parent5246e2ff257ee695dff8d585a6be1494176be38b (diff)
downloadniri-7b18ff8870c2610b3d532afef81a387a7a3f21d3.tar.gz
niri-7b18ff8870c2610b3d532afef81a387a7a3f21d3.tar.bz2
niri-7b18ff8870c2610b3d532afef81a387a7a3f21d3.zip
input: Intercept Enter key when confirming the exit dialog
-rw-r--r--src/input/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs
index 96e17bc2..d1d564cb 100644
--- a/src/input/mod.rs
+++ b/src/input/mod.rs
@@ -380,6 +380,10 @@ impl State {
if dialog.is_open() && pressed && raw == Some(Keysym::Return) {
info!("quitting after confirming exit dialog");
this.niri.stop_signal.stop();
+
+ // Don't send this Enter press to any clients.
+ this.niri.suppressed_keys.insert(key_code);
+ return FilterResult::Intercept(None);
}
}