From 5c72a4d45269638c7a8f72151db6cfd2b8895c35 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 1 Feb 2021 00:40:15 +0100 Subject: Fix T84780: Corrupt screen layout when loading file with area full-screen This could happen with files saved before ef4aa42ea4ff, so before global areas were written to .blend files. We would just always add the top- and status-bar, even though the screen wasn't supposed to have them. I'm not entirely sure what caused the further issues observed there, most code should probably handle the case fine still. But apparently something didn't. Steps to reproduce were: * Open Blender from before ef4aa42ea4ff (e.g 2.91 release) * In 3D View, View > Area > Toggle Fullscreen Area * Save the file * Open the saved file (can be in newer version too) The fullscreen is corrupt now, especially noticable after duplicating the workspace. --- source/blender/editors/screen/screen_edit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to '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 be52874ed0b..0868d5a5fe9 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -871,6 +871,11 @@ static void screen_global_area_refresh(wmWindow *win, const short height_min, const short height_max) { + /* Full-screens shouldn't have global areas. Don't touch them. */ + if (screen->state == SCREENFULL) { + return; + } + ScrArea *area = NULL; LISTBASE_FOREACH (ScrArea *, area_iter, &win->global_areas.areabase) { if (area_iter->spacetype == space_type) { -- cgit v1.2.3