windows: Fix ctrl-click
open hovered URL (#30574)
Closes #30452 Release Notes: - N/A
This commit is contained in:
parent
19b6c4444e
commit
33c896c23d
2 changed files with 13 additions and 4 deletions
|
@ -385,10 +385,6 @@ fn handle_keydown_msg(
|
|||
return Some(1);
|
||||
};
|
||||
let mut lock = state_ptr.state.borrow_mut();
|
||||
let Some(mut func) = lock.callbacks.input.take() else {
|
||||
return Some(1);
|
||||
};
|
||||
drop(lock);
|
||||
|
||||
let event = match keystroke_or_modifier {
|
||||
KeystrokeOrModifier::Keystroke(keystroke) => PlatformInput::KeyDown(KeyDownEvent {
|
||||
|
@ -396,9 +392,19 @@ fn handle_keydown_msg(
|
|||
is_held: lparam.0 & (0x1 << 30) > 0,
|
||||
}),
|
||||
KeystrokeOrModifier::Modifier(modifiers) => {
|
||||
if let Some(prev_modifiers) = lock.last_reported_modifiers {
|
||||
if prev_modifiers == modifiers {
|
||||
return Some(0);
|
||||
}
|
||||
}
|
||||
lock.last_reported_modifiers = Some(modifiers);
|
||||
PlatformInput::ModifiersChanged(ModifiersChangedEvent { modifiers })
|
||||
}
|
||||
};
|
||||
let Some(mut func) = lock.callbacks.input.take() else {
|
||||
return Some(1);
|
||||
};
|
||||
drop(lock);
|
||||
|
||||
let result = if func(event).default_prevented {
|
||||
Some(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue