[Bf-blender-cvs] [4a5af65fe9e] master: Fix T70048: Assert when cancelling Append window

Julian Eisel noreply at git.blender.org
Thu Sep 19 20:21:57 CEST 2019


Commit: 4a5af65fe9e3728f5ed2945044a957bafea736b3
Author: Julian Eisel
Date:   Thu Sep 19 20:18:53 2019 +0200
Branches: master
https://developer.blender.org/rB4a5af65fe9e3728f5ed2945044a957bafea736b3

Fix T70048: Assert when cancelling Append window

If the file browser was opened from an existing file browser editor
(using File -> Append would make the mouse hover the file browser in the
 Shading workspace), we need special handling for closing the fullscreen
area.
This change brings back the old way of handling fullscreen closing.

===================================================================

M	source/blender/editors/screen/screen_edit.c

===================================================================

diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 20920dc6f84..6b3fbb79cb4 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1371,9 +1371,23 @@ ScrArea *ED_screen_temp_space_open(bContext *C,
         sa = CTX_wm_area(C);
       }
       break;
-    case USER_TEMP_SPACE_DISPLAY_FULLSCREEN:
-      sa = ED_screen_full_newspace(C, CTX_wm_area(C), (int)space_type);
+    case USER_TEMP_SPACE_DISPLAY_FULLSCREEN: {
+      ScrArea *ctx_sa = CTX_wm_area(C);
+
+      if (ctx_sa->full) {
+        sa = ctx_sa;
+        ED_area_newspace(C, ctx_sa, space_type, true);
+        /* we already had a fullscreen here -> mark new space as a stacked fullscreen */
+        sa->flag |= (AREA_FLAG_STACKED_FULLSCREEN | AREA_FLAG_TEMP_TYPE);
+      }
+      else if (ctx_sa->spacetype == space_type) {
+        sa = ED_screen_state_toggle(C, CTX_wm_window(C), ctx_sa, SCREENMAXIMIZED);
+      }
+      else {
+        sa = ED_screen_full_newspace(C, ctx_sa, (int)space_type);
+      }
       break;
+    }
   }
 
   return sa;



More information about the Bf-blender-cvs mailing list