Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorNicholas Rishel <rishel.nick@gmail.com>2020-10-24 07:03:52 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2020-10-31 02:29:04 +0300
commitaf7b0003cb682b3762776c354ecb94d853aa1dab (patch)
tree1daf5ddd0406e08181e7f3b023463359aa275c5e /intern
parent50558416b93b5bb83a62f2f9b25a5bc6bf328d98 (diff)
Add explanation for dequing Wintab PACKETs during WT_PACKET event into a local queue to consume during WM_* mouse events.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp8
1 files changed, 8 insertions, 0 deletions
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)) {