Fix multi-key shortcuts (#13606)

Broken by the shift shift support PR

Release Notes:

- Fix multi-key shortcuts (preview only)
This commit is contained in:
Conrad Irwin 2024-06-27 14:44:18 -06:00 committed by GitHub
parent 7d7fd7d25d
commit e1fbef0dfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3201,13 +3201,7 @@ impl<'a> WindowContext<'a> {
} else if event.modifiers.number_of_modifiers() == 1 {
self.window.pending_modifiers = Some(event.modifiers);
}
if keystroke.is_none() {
self.finish_dispatch_key_event(event, dispatch_path);
return;
}
}
if let Some(key_down_event) = event.downcast_ref::<KeyDownEvent>() {
} else if let Some(key_down_event) = event.downcast_ref::<KeyDownEvent>() {
self.window.pending_modifiers.take();
let KeymatchResult {
bindings: key_down_bindings,
@ -3224,6 +3218,11 @@ impl<'a> WindowContext<'a> {
pending = key_down_pending;
}
if keystroke.is_none() {
self.finish_dispatch_key_event(event, dispatch_path);
return;
}
if pending {
let mut currently_pending = self.window.pending_input.take().unwrap_or_default();
if currently_pending.focus.is_some() && currently_pending.focus != self.window.focus {