diff options
author | Nicholas Rishel <rishel.nick@gmail.com> | 2021-12-03 08:41:00 +0300 |
---|---|---|
committer | Nicholas Rishel <rishel.nick@gmail.com> | 2021-12-03 08:49:31 +0300 |
commit | 0d4fd9c40239c9b1c9ebb891e6c2e36c40b3c73e (patch) | |
tree | f45c607f63b23fab4507bf6bdc741ed0d29f51ad | |
parent | 56ff9540307e0dee7478bbc4241d5e024ba1d8b3 (diff) |
Test fix.T93558
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 1 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_Wintab.cpp | 6 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_Wintab.h | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index e4630ad1ab5..d50adb266ce 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1607,6 +1607,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, if (inRange) { /* Some devices don't emit WT_CSRCHANGE events, so update cursor info here. */ wt->updateCursorInfo(); + wt->enterRange(); } else { wt->leaveRange(); diff --git a/intern/ghost/intern/GHOST_Wintab.cpp b/intern/ghost/intern/GHOST_Wintab.cpp index cf0309b1521..5918dc4e2dd 100644 --- a/intern/ghost/intern/GHOST_Wintab.cpp +++ b/intern/ghost/intern/GHOST_Wintab.cpp @@ -247,6 +247,12 @@ void GHOST_Wintab::leaveRange() m_fpPacketsGet(m_context.get(), m_pkts.size(), m_pkts.data()); } +void GHOST_Wintab::enterRange() +{ + /* Placeholder to signal tablet in range, necessary to disable mouse input handling. */ + m_lastTabletData.Active = GHOST_kTabletModeStylus; +} + void GHOST_Wintab::remapCoordinates() { LOGCONTEXT lc = {0}; diff --git a/intern/ghost/intern/GHOST_Wintab.h b/intern/ghost/intern/GHOST_Wintab.h index a6c41bf5f64..ace44b7dd28 100644 --- a/intern/ghost/intern/GHOST_Wintab.h +++ b/intern/ghost/intern/GHOST_Wintab.h @@ -92,6 +92,11 @@ class GHOST_Wintab { void loseFocus(); /** + * Updates tablet state to indicate tablet is in range. + */ + void enterRange(); + + /** * Clean up when Wintab leaves tracking range. */ void leaveRange(); |