Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_cursors.c
| Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /** | /** | ||||
| * \param bounds: can be NULL | * \param bounds: can be NULL | ||||
| */ | */ | ||||
| void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4]) | void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4]) | ||||
| { | { | ||||
| /* Only grab cursor when not running debug. | /* Only grab cursor when not running debug. | ||||
| * It helps not to get a stuck WM when hitting a breakpoint | * It helps not to get a stuck WM when hitting a break-point. */ | ||||
| * */ | |||||
| GHOST_TGrabCursorMode mode = GHOST_kGrabNormal; | GHOST_TGrabCursorMode mode = GHOST_kGrabNormal; | ||||
| GHOST_TAxisFlag mode_axis = GHOST_kAxisX | GHOST_kGrabAxisY; | GHOST_TAxisFlag mode_axis = GHOST_kAxisX | GHOST_kGrabAxisY; | ||||
| if (bounds) { | if (bounds) { | ||||
| wm_cursor_position_to_ghost(win, &bounds[0], &bounds[1]); | 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(win, &bounds[2], &bounds[3]); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 869 Lines • Show Last 20 Lines | |||||