Skip to content

Commit

Permalink
fix: intercept modifiere press for shortcut with no key
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 authored and Drakulix committed Jul 23, 2024
1 parent f406bf3 commit 4f04313
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 (
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 4f04313

Please sign in to comment.