Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_handlers.c
| Context not available. | |||||
| break; | break; | ||||
| case MOUSEMOVE: | case MOUSEMOVE: | ||||
| { | { | ||||
| wmWindow *win = CTX_wm_window(C); | |||||
| uiBut *but_other = ui_but_find_mouse_over(ar, event); | uiBut *but_other = ui_but_find_mouse_over(ar, event); | ||||
| bool exit = false; | bool exit = false; | ||||
| Context not available. | |||||
| else if (but_other && ui_but_is_editable(but_other) && (but_other != but)) { | else if (but_other && ui_but_is_editable(but_other) && (but_other != but)) { | ||||
| exit = true; | exit = true; | ||||
| } | } | ||||
| /* change cursor on mouse hover */ | |||||
| else if (ELEM(but->type, NUM, NUMSLI, BUT_NORMAL, TEX, SEARCH_MENU, SEARCH_MENU_UNLINK)) | |||||
| WM_cursor_modal_set(win, BC_TEXTEDITCURSOR); | |||||
| if (exit) { | if (exit) { | ||||
| data->cancel = true; | data->cancel = true; | ||||
| button_activate_state(C, but, BUTTON_STATE_EXIT); | button_activate_state(C, but, BUTTON_STATE_EXIT); | ||||
| /* reset the cursor */ | |||||
| if (!but_other || !ELEM(but_other->type, NUM, NUMSLI, BUT_NORMAL, TEX, SEARCH_MENU, SEARCH_MENU_UNLINK)) | |||||
| WM_cursor_modal_restore(win); | |||||
| } | } | ||||
| else if (event->x != event->prevx || event->y != event->prevy) { | else if (event->x != event->prevx || event->y != event->prevy) { | ||||
| /* re-enable tooltip on mouse move */ | /* re-enable tooltip on mouse move */ | ||||
| Context not available. | |||||