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:
authorCampbell Barton <ideasman42@gmail.com>2018-01-10 04:25:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-10 04:41:45 +0300
commitfdd3d969a621132ec0f3aeae8875b146f8e3a19d (patch)
treebaf9a648846089bc6aadda12067487cf199a0884 /source/blender/windowmanager/intern/wm_cursors.c
parent9aada45e52e88d272c38dc2e47cbc9a6d3d35698 (diff)
Fix T53491: Absolute tablet motion detection fails
When using a tablet, detecting absolute motion only worked when activating a tool with the tablet. Pressing Enter to run a tool for e.g. would use relative motion. Now store is_motion_absolute in the event, set for new events based on the most recent motion events.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index d4c3928bd6c..ad5e83ceda7 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -213,13 +213,10 @@ void WM_cursor_grab_enable(wmWindow *win, bool wrap, bool hide, int bounds[4])
}
if ((G.debug & G_DEBUG) == 0) {
if (win->ghostwin) {
- const GHOST_TabletData *tabletdata = GHOST_GetTabletData(win->ghostwin);
-
/* Note: There is no tabletdata on Windows if no tablet device is connected. */
- if (!tabletdata)
- GHOST_SetCursorGrab(win->ghostwin, mode, bounds, NULL);
- else if (tabletdata->Active == GHOST_kTabletModeNone)
+ if (win->eventstate->is_motion_absolute == false) {
GHOST_SetCursorGrab(win->ghostwin, mode, bounds, NULL);
+ }
win->grabcursor = mode;
}