[Bf-blender-cvs] [8bb56d7845b] grab_walk_fix: Supply tablet data with
Nicholas Rishel
noreply at git.blender.org
Sat Jul 24 00:27:50 CEST 2021
Commit: 8bb56d7845b6ceb13ae419a7942ccb41a6e7eb61
Author: Nicholas Rishel
Date: Fri Jul 16 15:08:07 2021 -0700
Branches: grab_walk_fix
https://developer.blender.org/rB8bb56d7845b6ceb13ae419a7942ccb41a6e7eb61
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 4f5e957077d..d0ca53e593b 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));
}
}
More information about the Bf-blender-cvs
mailing list