[Bf-blender-cvs] [538a2ac58f4] master: Allow double button up, otherwise there may be a trailing 0 pressure line.
Nicholas Rishel
noreply at git.blender.org
Sat Oct 31 00:32:25 CET 2020
Commit: 538a2ac58f4afe7e46cb2471d511280db8633f70
Author: Nicholas Rishel
Date: Wed Apr 15 18:25:13 2020 -0700
Branches: master
https://developer.blender.org/rB538a2ac58f4afe7e46cb2471d511280db8633f70
Allow double button up, otherwise there may be a trailing 0 pressure line.
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 703c0e42385..fb0c5f0507f 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1020,9 +1020,9 @@ GHOST_TSuccess GHOST_SystemWin32::processWintabEvents(GHOST_TEventType type,
info.time, GHOST_kEventCursorMove, window, info.x, info.y, info.tabletData));
break;
case GHOST_kEventButtonUp:
+ system->pushEvent(
+ new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData));
if (type == GHOST_kEventButtonUp && mask == info.button) {
- system->pushEvent(
- new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData));
unhandledButton = false;
}
window->updateWintabSysBut(MouseReleased);
@@ -1033,6 +1033,10 @@ GHOST_TSuccess GHOST_SystemWin32::processWintabEvents(GHOST_TEventType type,
}
// No Wintab button found correlating to the system button event, handle it too.
+ //
+ // Wintab button up events may be handled during WM_MOUSEMOVE, before their corresponding
+ // WM_*BUTTONUP event has fired, which results in two GHOST Button up events for a single Wintab
+ // associated button event. Because Wintab and their associated Windows mouse events are handled asynchronously, and there's no way to turn off
if (unhandledButton) {
system->pushEvent(new GHOST_EventButton(
system->getMilliSeconds(), type, window, mask, GHOST_TABLET_DATA_NONE));
More information about the Bf-blender-cvs
mailing list