fix: forward release for modifier-only bindings
This commit is contained in:
parent
cd881a4df2
commit
26daf75d93
1 changed files with 15 additions and 0 deletions
|
|
@ -2096,6 +2096,21 @@ impl State {
|
||||||
backend_id, seat, modifiers, handle, serial, keycode, key_state, time,
|
backend_id, seat, modifiers, handle, serial, keycode, key_state, time,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// A modifier-only binding fires on the modifier's release, but its press was already
|
||||||
|
// forwarded. Forward the release too.
|
||||||
|
if key_state == KeyState::Released
|
||||||
|
&& matches!(&result, FilterResult::Intercept(Some((_, binding))) if binding.key.is_none())
|
||||||
|
{
|
||||||
|
seat.get_keyboard().unwrap().input_forward(
|
||||||
|
self,
|
||||||
|
keycode,
|
||||||
|
key_state,
|
||||||
|
serial,
|
||||||
|
time,
|
||||||
|
previous_modifiers != *modifiers,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (matches!(result, FilterResult::Forward)
|
if (matches!(result, FilterResult::Forward)
|
||||||
&& !seat.get_keyboard().unwrap().is_grabbed()
|
&& !seat.get_keyboard().unwrap().is_grabbed()
|
||||||
&& !shortcuts_inhibited
|
&& !shortcuts_inhibited
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue