fix(windows): don't let Windows Ink report the mouse as a pen (Issue #48)

octotablet's default emulates a pen tool from the mouse on Windows Ink, so
every mouse move counted as pen hover and every click as pen down, while the
regular mouse events were ignored as duplicates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haraldandClaude Opus 5.5 committed 2026-10-27 15:44:42 +01:00
1 parent 1492f8affb
commit 8034c88f8b
1 file changed
+5 -1
+5 -1
View File
@@ -1304,7 +1304,11 @@ pub fn run_with(
// registered); the app then runs with mouse and touch events only
#[cfg(not(target_os = "android"))]
let tablet_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
octotablet::builder::Builder::default().build_shared(&window)
// Windows Ink would otherwise report the mouse as a pen (Issue #48): every mouse
// move counted as pen hover, every click as pen down next to the normal mouse events
octotablet::builder::Builder::default()
.emulate_tool_from_mouse(false)
.build_shared(&window)
}));
#[cfg(not(target_os = "android"))]
let mut tablet_manager = match tablet_result {