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
diff options
context:
space:
mode:
authorNicholas Rishel <rishel.nick@gmail.com>2020-04-16 04:25:13 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2020-10-31 02:29:03 +0300
commit538a2ac58f4afe7e46cb2471d511280db8633f70 (patch)
tree547e53fa480afc450ca0e21d4d265c8adf3d85e0 /intern/ghost/intern/GHOST_SystemWin32.cpp
parent7c84f254532efda46fdbcaebcf13d62d70193ff0 (diff)
Allow double button up, otherwise there may be a trailing 0 pressure line.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWin32.cpp')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp8
1 files changed, 6 insertions, 2 deletions
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));