Commit: bcab006892df9a1a957a4e2d34be29ac97f15c39
Author: Nicholas Rishel
Date: Fri Jul 16 15:08:07 2021 -0700
Branches: grab_walk_fix
https://developer.blender.org/rBbcab006892df9a1a957a4e2d34be29ac97f15c39
Supply tablet data with
===================================================================
M intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp
b/intern/ghost/intern/GHOST_SystemWin32.cpp
index f44107ee000..c34dd8ce015 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -997,15 +997,20 @@ void
GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
}
}
- /* Fallback cursor movement if Wintab position were never trusted while
processing this event. */
+ /* Fallback cursor movement if Wintab position were never trusted while
processing this event.
+ * This may happen if the tablet coordinate scaling is off, hasn't yet been
verified, or if the
+ * tablet is in mouse mode. */
if (!mouseMoveHandled) {
- DWORD pos = GetMessagePos();
- int x = GET_X_LPARAM(pos);
- int y = GET_Y_LPARAM(pos);
+ /* Use current cursor position, cursor position when first tablet event
was issued is likely
+ * pre-cursor jump from absolute tablet position. */
+ int x, y;
+ system->getCursorPosition(x, y);
/* TODO supply tablet data */
+ GHOST_TabletData td = wt->getLastTabletData();
+ td.Pressure = 1.0f;
system->pushEvent(new GHOST_EventCursor(
- system->getMilliSeconds(), GHOST_kEventCursorMove, window, x, y,
GHOST_TABLET_DATA_NONE));
+ system->getMilliSeconds(), GHOST_kEventCursorMove, window, x, y, td));
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs