Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_cursors.c
| Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | else { | ||||
| /* Fallback to default cursor if no bitmap found. */ | /* Fallback to default cursor if no bitmap found. */ | ||||
| GHOST_SetCursorShape(win->ghostwin, GHOST_kStandardCursorDefault); | GHOST_SetCursorShape(win->ghostwin, GHOST_kStandardCursorDefault); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region) | bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region) | ||||
| { | { | ||||
| if (region && (region->regiontype != RGN_TYPE_WINDOW)) { | if (region && !ELEM(region->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_PREVIEW)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| bToolRef_Runtime *tref_rt = (area && area->runtime.tool) ? area->runtime.tool->runtime : NULL; | bToolRef_Runtime *tref_rt = (area && area->runtime.tool) ? area->runtime.tool->runtime : NULL; | ||||
| if (tref_rt && tref_rt->cursor != WM_CURSOR_DEFAULT) { | if (tref_rt && tref_rt->cursor != WM_CURSOR_DEFAULT) { | ||||
| if (win->modalcursor == 0) { | if (win->modalcursor == 0) { | ||||
| WM_cursor_set(win, tref_rt->cursor); | WM_cursor_set(win, tref_rt->cursor); | ||||
| win->cursor = tref_rt->cursor; | win->cursor = tref_rt->cursor; | ||||
| ▲ Show 20 Lines • Show All 982 Lines • Show Last 20 Lines | |||||