diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-10 04:25:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-10 04:41:45 +0300 |
commit | fdd3d969a621132ec0f3aeae8875b146f8e3a19d (patch) | |
tree | baf9a648846089bc6aadda12067487cf199a0884 /source/blender/windowmanager/intern/wm_cursors.c | |
parent | 9aada45e52e88d272c38dc2e47cbc9a6d3d35698 (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.c | 7 |
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; } |