diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-17 11:56:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-17 12:17:45 +0300 |
commit | 12e523d12c88d05d220f426bdb08525a572649d6 (patch) | |
tree | 019d4d9233fcafdec11ddd391c775d8418de642b /source/blender/editors/screen | |
parent | 35a298db52094771c34320f8f1dc1d103ba8373c (diff) |
Fix menu navigation and modal tools affecting the active region.
We updated the active region during redraw to fix missing updates on
file load, restrict it more now to avoid unwanted updates.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 8ebdb5f32b8..7167b48c06e 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -848,6 +848,7 @@ void ED_screens_initialize(wmWindowManager *wm) ED_screen_global_areas_create(win); } ED_screen_refresh(wm, win); + ED_screen_set_active_region(NULL, win, &win->eventstate->x); } } @@ -992,9 +993,8 @@ static void screen_cursor_set(wmWindow *win, const int xy[2]) /* called in wm_event_system.c. sets state vars in screen, cursors */ /* event type is mouse move */ -void ED_screen_set_active_region(bContext *C, const int xy[2]) +void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) { - wmWindow *win = CTX_wm_window(C); bScreen *scr = WM_window_get_active_screen(win); if (scr) { @@ -1058,7 +1058,9 @@ void ED_screen_set_active_region(bContext *C, const int xy[2]) /* this used to be a notifier, but needs to be done immediate * because it can undo setting the right button as active due * to delayed notifier handling */ - UI_screen_free_active_but(C, scr); + if (C) { + UI_screen_free_active_but(C, scr); + } } else region_cursor_set(win, false); |