Desktop: Resize issue mitigation, scroll speed adjustment and duplicate pointer move event filtering (#3424)

* mitigate resizing issue on mac and windows

* adjust scroll speed for mac and win

* fixup

* filter out duplicate mouse move events
This commit is contained in:
Timon
2025-11-27 16:18:52 +00:00
committed by GitHub
parent 8cebde76e2
commit f4608a6e40
4 changed files with 25 additions and 5 deletions
+4 -2
View File
@@ -13,14 +13,16 @@ use super::consts::{PINCH_ZOOM_SPEED, SCROLL_LINE_HEIGHT, SCROLL_LINE_WIDTH, SCR
pub(crate) fn handle_window_event(browser: &Browser, input_state: &mut InputState, event: &WindowEvent) {
match event {
WindowEvent::PointerMoved { position, .. } | WindowEvent::PointerEntered { position, .. } => {
input_state.cursor_move(position);
if !input_state.cursor_move(position) {
return;
}
let Some(host) = browser.host() else { return };
host.send_mouse_move_event(Some(&input_state.into()), 0);
}
WindowEvent::PointerLeft { position, .. } => {
if let Some(position) = position {
input_state.cursor_move(position);
let _ = input_state.cursor_move(position);
}
let Some(host) = browser.host() else { return };