diff options
-rw-r--r-- | source/blender/editors/render/render_view.c | 16 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 9 |
2 files changed, 18 insertions, 7 deletions
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index f7399d4e6cb..6c3572f4db9 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->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) { diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 3972d00293c..c286669da1f 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1765,9 +1765,12 @@ void ED_screen_full_prevspace(bContext *C, ScrArea *sa) wmWindow *win = CTX_wm_window(C); ED_area_prevspace(C, sa); - - if (sa->full) - ED_screen_state_toggle(C, win, sa, SCREENMAXIMIZED); + + if (sa->full) { + /* only toggle out of fullscreen if it wasn't set by the user (for stacked fullscreens) */ + if (sa->flag & AREA_FLAG_TEMP_TYPE) + ED_screen_state_toggle(C, win, sa, SCREENMAXIMIZED); + } } void ED_screen_retore_temp_type(bContext *C, ScrArea *sa, bool is_screen_change) |