tablet: send motions 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.
This commit is contained in:
Junxuan Liao 2025-01-23 06:35:13 -06:00 committed by GitHub
parent ecae3c5e4b
commit ae4e38d9d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;