[Bf-blender-cvs] [a080accdb67] master: When there are not associated button events, assume there is no button events until one is found. This prevents errant cursor moves that occur before the Wintab button event is reported. We need to skip these events because if no button event exists, we generate one assuming it will either arrive later in the Wintab queue or that the button was from a non-Wintab device. For the case that this was generated by a non-wintab device, such as buttons mapped to mouse on the tablet pad, these cursor move events can significantly move the cursor from the intended click position.

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


Commit: a080accdb67e53010e31e4fe647d91cdd73d3b2a
Author: Nicholas Rishel
Date:   Mon May 25 21:10:17 2020 -0700
Branches: master
https://developer.blender.org/rBa080accdb67e53010e31e4fe647d91cdd73d3b2a

When there are not associated button events, assume there is no button
events until one is found. This prevents errant cursor moves that occur
before the Wintab button event is reported. We need to skip these events
because if no button event exists, we generate one assuming it will either
arrive later in the Wintab queue or that the button was from a non-Wintab
device. For the case that this was generated by a non-wintab device, such
as buttons mapped to mouse on the tablet pad, these cursor move events can
significantly move the cursor from the intended click position.

Signed-off-by: Nicholas Rishel <rishel.nick at gmail.com>

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

M	intern/ghost/intern/GHOST_SystemWin32.cpp

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

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index e40934dd1ad..34d4940de1d 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -990,7 +990,10 @@ GHOST_TSuccess GHOST_SystemWin32::processWintabEvents(GHOST_TEventType type,
    * skip those and find the last button down mapped to mouse buttons.
    */
   if (!window->wintabSysButPressed()) {
-    for (auto it = wtiIter; it != wintabInfo.end(); it++) {
+    // Assume there may be no button down event currently in the queue.
+    wtiIter = wintabInfo.end();
+
+    for (auto it = wintabInfo.begin(); it != wintabInfo.end(); it++) {
       if (it->type == GHOST_kEventButtonDown) {
         wtiIter = it;
       }



More information about the Bf-blender-cvs mailing list