diff options
| author | fuyu147 <fuyu.147@hotmail.com> | 2025-12-19 11:14:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-19 16:14:22 +0000 |
| commit | 315806f59816aacdbf7c66aaeaa0e49d3a33a66d (patch) | |
| tree | 3969eaf1ac96bd2cd3948065f470c19f8cceacb5 /src/managers/input | |
| parent | 6175ecd4c4ba817c4620f66a75e1e11da7c7a8ca (diff) | |
tablet: added option to hide cursor (#12525)
Diffstat (limited to 'src/managers/input')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 6 | ||||
| -rw-r--r-- | src/managers/input/InputManager.hpp | 3 | ||||
| -rw-r--r-- | src/managers/input/Tablets.cpp | 2 |
3 files changed, 9 insertions, 2 deletions
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); } |
