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-05-26 07:10:17 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2020-10-31 02:29:03 +0300
commita080accdb67e53010e31e4fe647d91cdd73d3b2a (patch)
treef025a5caceeb77b6d1060269bc0b1971b1e65d18 /intern
parent1f25235ec305e8f448a5d854d3c1bc7500110adf (diff)
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@gmail.com>
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp5
1 files changed, 4 insertions, 1 deletions
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;
}