diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_cursors.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 6fc6a57ade1..7853b40c98a 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -179,7 +179,10 @@ void WM_cursor_wait(int val) } } -void WM_cursor_grab_enable(wmWindow *win, int wrap, int hide, int *bounds) +/** + * \param bounds can be NULL + */ +void WM_cursor_grab_enable(wmWindow *win, int wrap, int hide, int bounds[4]) { /* Only grab cursor when not running debug. * It helps not to get a stuck WM when hitting a breakpoint @@ -193,20 +196,20 @@ void WM_cursor_grab_enable(wmWindow *win, int wrap, int hide, int *bounds) 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); + GHOST_SetCursorGrab(win->ghostwin, mode, bounds, NULL); else if (tabletdata->Active == GHOST_kTabletModeNone) - GHOST_SetCursorGrab(win->ghostwin, mode, bounds); + GHOST_SetCursorGrab(win->ghostwin, mode, bounds, NULL); win->grabcursor = mode; } } } -void WM_cursor_grab_disable(wmWindow *win) +void WM_cursor_grab_disable(wmWindow *win, int mouse_ungrab_xy[2]) { if ((G.debug & G_DEBUG) == 0) { if (win && win->ghostwin) { - GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, NULL); + GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, NULL, mouse_ungrab_xy); win->grabcursor = GHOST_kGrabDisable; } } |