diff --git a/.changes/linux-mouse.md b/.changes/linux-mouse.md new file mode 100644 index 000000000000..d1713a326c71 --- /dev/null +++ b/.changes/linux-mouse.md @@ -0,0 +1,5 @@ +--- +"tauri-runtime-wry": patch +--- + +Disable cursor mouse events on Linux. diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 4d25557f1a23..2525746eed5e 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -750,6 +750,12 @@ impl WindowBuilder for WindowBuilderWrapper { "); } + #[cfg(target_os = "linux")] + { + // Mouse event is disabled on Linux since sudden event bursts could block event loop. + window.inner = window.inner.with_cursor_moved_event(false); + } + if let (Some(min_width), Some(min_height)) = (config.min_width, config.min_height) { window = window.min_inner_size(min_width, min_height); }