tablet: added option to hide cursor (#12525)
This commit is contained in:
parent
6175ecd4c4
commit
315806f598
7 changed files with 25 additions and 4 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue