[Bf-blender-cvs] [f7e8445] master: Fix T43008: Support stacked fullscreen areas
julianeisel
noreply at git.blender.org
Sat Jan 24 23:02:34 CET 2015
Commit: f7e844570fea862322b235d31a781f32d4cf04d9
Author: julianeisel
Date: Sat Jan 24 22:53:22 2015 +0100
Branches: master
https://developer.blender.org/rBf7e844570fea862322b235d31a781f32d4cf04d9
Fix T43008: Support stacked fullscreen areas
===================================================================
M source/blender/editors/render/render_view.c
M source/blender/editors/screen/screen_edit.c
===================================================================
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index f7399d4..6c3572f 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 3972d00..c286669 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)
More information about the Bf-blender-cvs
mailing list