[Bf-blender-cvs] [0d4fd9c4023] T93558: Test fix.
Nicholas Rishel
noreply at git.blender.org
Fri Dec 3 06:50:06 CET 2021
Commit: 0d4fd9c40239c9b1c9ebb891e6c2e36c40b3c73e
Author: Nicholas Rishel
Date: Thu Dec 2 21:41:00 2021 -0800
Branches: T93558
https://developer.blender.org/rB0d4fd9c40239c9b1c9ebb891e6c2e36c40b3c73e
Test fix.
===================================================================
M intern/ghost/intern/GHOST_SystemWin32.cpp
M intern/ghost/intern/GHOST_Wintab.cpp
M intern/ghost/intern/GHOST_Wintab.h
===================================================================
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
@@ -91,6 +91,11 @@ class GHOST_Wintab {
*/
void loseFocus();
+ /**
+ * Updates tablet state to indicate tablet is in range.
+ */
+ void enterRange();
+
/**
* Clean up when Wintab leaves tracking range.
*/
More information about the Bf-blender-cvs
mailing list