From 315806f59816aacdbf7c66aaeaa0e49d3a33a66d Mon Sep 17 00:00:00 2001 From: fuyu147 Date: Fri, 19 Dec 2025 11:14:22 -0500 Subject: tablet: added option to hide cursor (#12525) --- src/managers/input/InputManager.cpp | 6 ++++-- src/managers/input/InputManager.hpp | 3 +++ src/managers/input/Tablets.cpp | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/managers/input') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 764c394e..746b6acf 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -146,7 +146,8 @@ void CInputManager::onMouseMoved(IPointer::SMotionEvent e) { m_lastCursorMovement.reset(); - m_lastInputTouch = false; + m_lastInputTouch = false; + m_lastInputTablet = false; if (e.mouse) m_lastMousePos = getMouseCoordsInternal(); @@ -159,7 +160,8 @@ void CInputManager::onMouseWarp(IPointer::SMotionAbsoluteEvent e) { m_lastCursorMovement.reset(); - m_lastInputTouch = false; + m_lastInputTouch = false; + m_lastInputTablet = false; } void CInputManager::simulateMouseMovement() { diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index c3d6ac2f..239f6140 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -208,6 +208,9 @@ class CInputManager { // for hiding cursor on touch bool m_lastInputTouch = false; + // for hiding cursor on tablet + bool m_lastInputTablet = false; + // for tracking mouse refocus PHLWINDOWREF m_lastMouseFocus; diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index 5bb0bb50..52be6eee 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -216,9 +216,11 @@ void CInputManager::onTabletProximity(CTablet::SProximityEvent e) { PTOOL->m_active = e.in; if (!e.in) { + m_lastInputTablet = false; if (PTOOL->getSurface()) unfocusTool(PTOOL); } else { + m_lastInputTablet = true; simulateMouseMovement(); refocusTablet(PTAB, PTOOL); } -- cgit v1.2.3