diff options
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 20 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 10 |
2 files changed, 17 insertions, 13 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 0e4dd701a58..d39b70802fe 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1339,7 +1339,7 @@ static void area_calc_totrct(ScrArea *sa, int sizex, int sizey) /* used for area initialize below */ -static void region_subwindow(wmWindow *win, ARegion *ar) +static void region_subwindow(wmWindow *win, ARegion *ar, bool activate) { bool hidden = (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) != 0; @@ -1351,10 +1351,12 @@ static void region_subwindow(wmWindow *win, ARegion *ar) wm_subwindow_close(win, ar->swinid); ar->swinid = 0; } - else if (ar->swinid == 0) - ar->swinid = wm_subwindow_open(win, &ar->winrct); - else - wm_subwindow_position(win, ar->swinid, &ar->winrct); + else if (ar->swinid == 0) { + ar->swinid = wm_subwindow_open(win, &ar->winrct, activate); + } + else { + wm_subwindow_position(win, ar->swinid, &ar->winrct, activate); + } } static void ed_default_handlers(wmWindowManager *wm, ScrArea *sa, ListBase *handlers, int flag) @@ -1457,7 +1459,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) /* region windows, default and own handlers */ for (ar = sa->regionbase.first; ar; ar = ar->next) { - region_subwindow(win, ar); + region_subwindow(win, ar, false); if (ar->swinid) { /* default region handlers */ @@ -1498,10 +1500,10 @@ void ED_region_update_rect(bContext *C, ARegion *ar) void ED_region_init(bContext *C, ARegion *ar) { // ARegionType *at = ar->type; - + /* refresh can be called before window opened */ - region_subwindow(CTX_wm_window(C), ar); - + region_subwindow(CTX_wm_window(C), ar, false); + region_update_rect(ar); } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index a5b25645f2a..fce2ef3eb2d 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1233,10 +1233,12 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win) screen_test_scale(win->screen, winsize_x, winsize_y); - if (win->screen->mainwin == 0) - win->screen->mainwin = wm_subwindow_open(win, &winrct); - else - wm_subwindow_position(win, win->screen->mainwin, &winrct); + if (win->screen->mainwin == 0) { + win->screen->mainwin = wm_subwindow_open(win, &winrct, false); + } + else { + wm_subwindow_position(win, win->screen->mainwin, &winrct, false); + } for (sa = win->screen->areabase.first; sa; sa = sa->next) { /* set spacetype and region callbacks, calls init() */ |