[Bf-blender-cvs] [58b52719bfb] T93558: Test fix.

Nicholas Rishel noreply at git.blender.org
Fri Dec 3 06:41:40 CET 2021


Commit: 58b52719bfb067f90901a799c874fd6685ec9327
Author: Nicholas Rishel
Date:   Thu Dec 2 21:41:00 2021 -0800
Branches: T93558
https://developer.blender.org/rB58b52719bfb067f90901a799c874fd6685ec9327

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 443c726d270..6ab1af176c4 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