diff options
Diffstat (limited to 'source/blender/editors/render/render_view.c')
-rw-r--r-- | source/blender/editors/render/render_view.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index c43083a1616..12f9c8f40c1 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -91,8 +91,10 @@ static ScrArea *find_area_showing_r_result(bContext *C, Scene *scene, wmWindow * /* find an imagewindow showing render result */ for (*win = wm->windows.first; *win; *win = (*win)->next) { - if ((*win)->screen->scene == scene) { - for (sa = (*win)->screen->areabase.first; sa; sa = sa->next) { + if (WM_window_get_active_scene(*win) == scene) { + const bScreen *screen = WM_window_get_active_screen(*win); + + for (sa = screen->areabase.first; sa; sa = sa->next) { if (sa->spacetype == SPACE_IMAGE) { sima = sa->spacedata.first; if (sima->image && sima->image->type == IMA_TYPE_R_RESULT) @@ -248,7 +250,7 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op)) } /* test if we have a temp screen in front */ - if (win->screen->temp) { + if (WM_window_is_temp_screen(win)) { wm_window_lower(win); return OPERATOR_FINISHED; } @@ -294,7 +296,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *op, const wmEvent *e wmWindow *wincur = CTX_wm_window(C); /* test if we have currently a temp screen active */ - if (wincur->screen->temp) { + if (WM_window_is_temp_screen(wincur)) { wm_window_lower(wincur); } else { @@ -303,8 +305,9 @@ static int render_view_show_invoke(bContext *C, wmOperator *op, const wmEvent *e /* is there another window on current scene showing result? */ for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) { - bScreen *sc = win->screen; - if ((sc->temp && ((ScrArea *)sc->areabase.first)->spacetype == SPACE_IMAGE) || + const bScreen *sc = WM_window_get_active_screen(win); + + if ((WM_window_is_temp_screen(win) && ((ScrArea *)sc->areabase.first)->spacetype == SPACE_IMAGE) || (win == winshow && winshow != wincur)) { wm_window_raise(win); |