diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_cursors.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index fc992ef069d..43be87fce39 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -228,11 +228,11 @@ void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4]) /* Only grab cursor when not running debug. * It helps not to get a stuck WM when hitting a break-point. */ GHOST_TGrabCursorMode mode = GHOST_kGrabNormal; - GHOST_TAxisFlag mode_axis = GHOST_kAxisX | GHOST_kGrabAxisY; + GHOST_TAxisFlag mode_axis = GHOST_kAxisX | GHOST_kAxisY; if (bounds) { - wm_cursor_position_to_ghost(win, &bounds[0], &bounds[1]); - wm_cursor_position_to_ghost(win, &bounds[2], &bounds[3]); + wm_cursor_position_to_ghost_screen_coords(win, &bounds[0], &bounds[1]); + wm_cursor_position_to_ghost_screen_coords(win, &bounds[2], &bounds[3]); } if (hide) { @@ -245,7 +245,7 @@ void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4]) mode_axis = GHOST_kAxisX; } else if (wrap == WM_CURSOR_WRAP_Y) { - mode_axis = GHOST_kGrabAxisY; + mode_axis = GHOST_kAxisY; } } @@ -266,12 +266,11 @@ void WM_cursor_grab_disable(wmWindow *win, const int mouse_ungrab_xy[2]) if (win && win->ghostwin) { if (mouse_ungrab_xy) { int mouse_xy[2] = {mouse_ungrab_xy[0], mouse_ungrab_xy[1]}; - wm_cursor_position_to_ghost(win, &mouse_xy[0], &mouse_xy[1]); - GHOST_SetCursorGrab( - win->ghostwin, GHOST_kGrabDisable, GHOST_kGrabAxisNone, NULL, mouse_xy); + wm_cursor_position_to_ghost_screen_coords(win, &mouse_xy[0], &mouse_xy[1]); + GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, GHOST_kAxisNone, NULL, mouse_xy); } else { - GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, GHOST_kGrabAxisNone, NULL, NULL); + GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, GHOST_kAxisNone, NULL, NULL); } win->grabcursor = GHOST_kGrabDisable; |