diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-04-19 17:04:44 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-04-19 17:17:34 +0300 |
commit | 37493fb9fefca6a090bea689de11b4b995b7bdb0 (patch) | |
tree | 47718ca5d285bb60abde3d96b3d35fce3ea43e29 /source/blender/editors/screen/screen_edit.c | |
parent | 9b48f2b27c0f64c7f8cc452ad3820f705c15495d (diff) |
Toggle to standard cursor when opening menus/popups
Cursor is now set to standard arrow-cursor when opening menu, and reset to previous one when closing it. Previously it just stayed as it was before, e.g. the edit mode cross-cursor stayed active even if a menu was opened.
Fixes T48192.
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 21d257ea161..23c6aa37a83 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1064,17 +1064,11 @@ bScreen *ED_screen_duplicate(wmWindow *win, bScreen *sc) /* screen sets cursor based on swinid */ static void region_cursor_set(wmWindow *win, int swinid, int swin_changed) { - ScrArea *sa = win->screen->areabase.first; - - for (; sa; sa = sa->next) { - ARegion *ar = sa->regionbase.first; - for (; ar; ar = ar->next) { + for (ScrArea *sa = win->screen->areabase.first; sa; sa = sa->next) { + for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->swinid == swinid) { if (swin_changed || (ar->type && ar->type->event_cursor)) { - if (ar->type && ar->type->cursor) - ar->type->cursor(win, sa, ar); - else - WM_cursor_set(win, CURSOR_STD); + ED_region_cursor_set(win, sa, ar); } return; } |