fix: intercept modifiere press for shortcut with no key

This commit is contained in:
Ashley Wulber 2024-07-23 00:05:33 -04:00 committed by Victoria Brekenfeld
parent f406bf33ae
commit 4f043133bc

View file

@ -435,6 +435,7 @@ impl State {
}
// handle the rest of the global shortcuts
let mut intercepted = false;
let mut can_clear_modifiers_shortcut = true;
if !shortcuts_inhibited {
let modifiers_queue = seat.modifiers_shortcut_queue();
@ -454,6 +455,7 @@ impl State {
if !modifiers_bypass && binding.key.is_none() && state == KeyState::Pressed && cosmic_modifiers_eq_smithay(&binding.modifiers, modifiers) {
modifiers_queue.set(binding.clone());
can_clear_modifiers_shortcut = false;
intercepted = true;
}
if (
@ -482,7 +484,11 @@ impl State {
// keys are passed through to apps
std::mem::drop(shell);
FilterResult::Forward
if intercepted {
FilterResult::Intercept(None)
} else {
FilterResult::Forward
}
},
)
.flatten()