[Bf-blender-cvs] [af7b0003cb6] master: Add explanation for dequing Wintab PACKETs during WT_PACKET event into a local queue to consume during WM_* mouse events.

Nicholas Rishel noreply at git.blender.org
Sat Oct 31 00:32:30 CET 2020


Commit: af7b0003cb682b3762776c354ecb94d853aa1dab
Author: Nicholas Rishel
Date:   Fri Oct 23 21:03:52 2020 -0700
Branches: master
https://developer.blender.org/rBaf7b0003cb682b3762776c354ecb94d853aa1dab

Add explanation for dequing Wintab PACKETs during WT_PACKET event into a local queue to consume during WM_* mouse events.

===================================================================

M	intern/ghost/intern/GHOST_WindowWin32.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 381b1198f7e..e22fbf7ae2d 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -1389,6 +1389,14 @@ GHOST_TSuccess GHOST_WindowWin32::getWintabInfo(std::vector<GHOST_WintabInfoWin3
   return GHOST_kSuccess;
 }
 
+/* Wintab (per documentation but may vary with implementation) does not update when its event
+ * buffer is full. This is an issue because we need some synchronization point between Wintab
+ * events and Win32 events, so we can't drain and process the queue immediately. We need to
+ * associate Wintab mouse events to Win32 mouse events because Wintab buttons are modal (a button
+ * associated to left click is not always a left click) and there's no way to reconstruct their
+ * mode from the Wintab API alone. There is no guaranteed ordering between Wintab and Win32 mouse
+ * events and no documented time stamp shared between the two, so we synchronize on mouse button
+ * events. */
 void GHOST_WindowWin32::updatePendingWintabEvents()
 {
   if (!(m_wintab.packetsGet && m_wintab.context)) {



More information about the Bf-blender-cvs mailing list