From ae4e38d9d5faddd6e1dbc1750f589ef33d5ac16c Mon Sep 17 00:00:00 2001 From: Junxuan Liao <70618504+MikeWalrus@users.noreply.github.com> Date: Thu, 23 Jan 2025 06:35:13 -0600 Subject: [PATCH] tablet: send `motion`s on tip events (#9132) Typically, the position of the tool tip also changes on tool tip events, so we should forward this update to the clients. --- src/managers/input/Tablets.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index f61d8184..0952a7d4 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -159,12 +159,13 @@ void CInputManager::onTabletAxis(CTablet::SAxisEvent e) { void CInputManager::onTabletTip(CTablet::STipEvent e) { const auto PTAB = e.tablet; const auto PTOOL = ensureTabletToolPresent(e.tool); + const auto POS = e.tip; + g_pPointerManager->warpAbsolute(POS, PTAB); + refocusTablet(PTAB, PTOOL, true); - if (e.in) { - simulateMouseMovement(); - refocusTablet(PTAB, PTOOL); + if (e.in) PROTO::tablet->down(PTOOL); - } else + else PROTO::tablet->up(PTOOL); PTOOL->isDown = e.in;