fix: intercept modifiere press for shortcut with no key
This commit is contained in:
parent
f406bf33ae
commit
4f043133bc
1 changed files with 7 additions and 1 deletions
|
|
@ -435,6 +435,7 @@ impl State {
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle the rest of the global shortcuts
|
// handle the rest of the global shortcuts
|
||||||
|
let mut intercepted = false;
|
||||||
let mut can_clear_modifiers_shortcut = true;
|
let mut can_clear_modifiers_shortcut = true;
|
||||||
if !shortcuts_inhibited {
|
if !shortcuts_inhibited {
|
||||||
let modifiers_queue = seat.modifiers_shortcut_queue();
|
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) {
|
if !modifiers_bypass && binding.key.is_none() && state == KeyState::Pressed && cosmic_modifiers_eq_smithay(&binding.modifiers, modifiers) {
|
||||||
modifiers_queue.set(binding.clone());
|
modifiers_queue.set(binding.clone());
|
||||||
can_clear_modifiers_shortcut = false;
|
can_clear_modifiers_shortcut = false;
|
||||||
|
intercepted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
@ -482,7 +484,11 @@ impl State {
|
||||||
|
|
||||||
// keys are passed through to apps
|
// keys are passed through to apps
|
||||||
std::mem::drop(shell);
|
std::mem::drop(shell);
|
||||||
FilterResult::Forward
|
if intercepted {
|
||||||
|
FilterResult::Intercept(None)
|
||||||
|
} else {
|
||||||
|
FilterResult::Forward
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.flatten()
|
.flatten()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue