diff options
Diffstat (limited to 'source/blender/editors/render/render_view.c')
-rw-r--r-- | source/blender/editors/render/render_view.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index ab28f5fa675..fe357a7a0e2 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -161,11 +161,19 @@ ScrArea *render_view_open(bContext *C, int mx, int my) } else if (scene->r.displaymode == R_OUTPUT_SCREEN) { sa = CTX_wm_area(C); - if (sa && sa->spacetype == SPACE_IMAGE) - area_was_image = true; - /* this function returns with changed context */ - sa = ED_screen_full_newspace(C, sa, SPACE_IMAGE); + /* if the active screen is already in fullscreen mode, skip this and + * unset the area, so that the fullscreen area is just changed later */ + if (sa && sa->full) { + sa = NULL; + } + else { + if (sa && sa->spacetype == SPACE_IMAGE) + area_was_image = true; + + /* this function returns with changed context */ + sa = ED_screen_full_newspace(C, sa, SPACE_IMAGE); + } } if (!sa) { @@ -186,10 +194,15 @@ ScrArea *render_view_open(bContext *C, int mx, int my) /* makes ESC go back to prev space */ sima->flag |= SI_PREVSPACE; + + /* we already had a fullscreen here -> mark new space as a stacked fullscreen */ + if (sa->full) { + sa->flag |= AREA_FLAG_STACKED_FULLSCREEN; + } } else { /* use any area of decent size */ - sa = BKE_screen_find_big_area(CTX_wm_screen(C), -1, 0); + sa = BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_TYPE_ANY, 0); if (sa->spacetype != SPACE_IMAGE) { // XXX newspace(sa, SPACE_IMAGE); sima = sa->spacedata.first; |