Fix assorted linux issues (#10061)

- Fix a bug where modifiers would be dispatched before they changed
- Add a secondary modifier
- Improve keybindings

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki
2024-04-01 17:22:59 -07:00
committed by GitHub
parent e0cd96db7b
commit 1da2441e7b
20 changed files with 220 additions and 154 deletions
+3 -3
View File
@@ -1510,12 +1510,12 @@ impl Interactivity {
};
if self.location.is_some()
&& text_bounds.contains(&cx.mouse_position())
&& cx.modifiers().command
&& cx.modifiers().secondary()
{
let command_held = cx.modifiers().command;
let secondary_held = cx.modifiers().secondary();
cx.on_key_event({
move |e: &crate::ModifiersChangedEvent, _phase, cx| {
if e.modifiers.command != command_held
if e.modifiers.secondary() != secondary_held
&& text_bounds.contains(&cx.mouse_position())
{
cx.refresh();