Don't send key on release from niri actions

Some clients run logic on `Release`, thus don't send the key originally
used for running `niri` actions.

Fixes #28.
This commit is contained in:
Kirill Chibisov
2023-10-27 16:50:02 +04:00
committed by Ivan Molodetskikh
parent 0a2052945e
commit 5c24754435
3 changed files with 460 additions and 293 deletions
+4 -1
View File
@@ -1,5 +1,5 @@
use std::cell::RefCell;
use std::collections::HashMap;
use std::collections::{HashMap, HashSet};
use std::ffi::OsString;
use std::path::PathBuf;
use std::rc::Rc;
@@ -136,6 +136,8 @@ pub struct Niri {
pub presentation_state: PresentationState,
pub seat: Seat<State>,
/// Scancodes of the keys to suppress.
pub suppressed_keys: HashSet<u32>,
pub default_cursor: Cursor,
pub cursor_image: CursorImageStatus,
@@ -633,6 +635,7 @@ impl Niri {
primary_selection_state,
data_control_state,
popups: PopupManager::default(),
suppressed_keys: HashSet::new(),
presentation_state,
seat,