Fix T43008: Support stacked fullscreen areas

This commit is contained in:
julianeisel
2015-01-24 22:53:22 +01:00
parent 31219415d6
commit f7e844570f
2 changed files with 18 additions and 7 deletions

View File

@@ -161,12 +161,20 @@ ScrArea *render_view_open(bContext *C, int mx, int my)
} }
else if (scene->r.displaymode == R_OUTPUT_SCREEN) { else if (scene->r.displaymode == R_OUTPUT_SCREEN) {
sa = CTX_wm_area(C); sa = CTX_wm_area(C);
/* 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) if (sa && sa->spacetype == SPACE_IMAGE)
area_was_image = true; area_was_image = true;
/* this function returns with changed context */ /* this function returns with changed context */
sa = ED_screen_full_newspace(C, sa, SPACE_IMAGE); sa = ED_screen_full_newspace(C, sa, SPACE_IMAGE);
} }
}
if (!sa) { if (!sa) {
sa = find_area_showing_r_result(C, scene, &win); sa = find_area_showing_r_result(C, scene, &win);

View File

@@ -1766,9 +1766,12 @@ void ED_screen_full_prevspace(bContext *C, ScrArea *sa)
ED_area_prevspace(C, sa); ED_area_prevspace(C, sa);
if (sa->full) 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); ED_screen_state_toggle(C, win, sa, SCREENMAXIMIZED);
} }
}
void ED_screen_retore_temp_type(bContext *C, ScrArea *sa, bool is_screen_change) void ED_screen_retore_temp_type(bContext *C, ScrArea *sa, bool is_screen_change)
{ {