input: Use suppresssed_keys() for a11y grabs

This mostly seems to behave the same way, but presumably we want a key
release to be treated as grabbed if and only if the press had been.
This commit is contained in:
Ian Douglas Scott 2025-11-20 13:03:59 -08:00 committed by Ian Douglas Scott
parent a3904af03c
commit 1c35339076

View file

@ -1833,12 +1833,14 @@ impl State {
return FilterResult::Intercept(None); return FilterResult::Intercept(None);
} }
if self.common.a11y_keyboard_monitor_state.has_keyboard_grab() if event.state() == KeyState::Pressed
|| self && (self.common.a11y_keyboard_monitor_state.has_keyboard_grab()
.common || self
.a11y_keyboard_monitor_state .common
.has_key_grab(modifiers, handle.modified_sym()) .a11y_keyboard_monitor_state
.has_key_grab(modifiers, handle.modified_sym()))
{ {
seat.supressed_keys().add(&handle, None);
return FilterResult::Intercept(None); return FilterResult::Intercept(None);
} }