From 304767dcd3459d222d8c6011e913840df74a6cd5 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 4 Aug 2020 19:46:38 +0200 Subject: Fix T78688: Crash changing workspace with specific fullscreen setup When switching workspaces we need to have an unused screen layout that we can activate. The other window now showed the only available screen layout in fullscreen though. Usually when there's no unused screen layout we duplicate an existing one, but that code didn't respect the fullscreen case properly. This also tries to clean up the logic a bit, but things are still rather complicated to follow. Changes in this code are always risky. Of course things worked fine in my tests, but I wouldn't be surprised if something breaks. --- source/blender/editors/include/ED_screen.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/editors/include/ED_screen.h') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index ae99edc950a..fcc70a49d36 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -287,6 +287,12 @@ bool ED_workspace_delete(struct WorkSpace *workspace, struct bContext *C, struct wmWindowManager *wm) ATTR_NONNULL(); void ED_workspace_scene_data_sync(struct WorkSpaceInstanceHook *hook, Scene *scene) ATTR_NONNULL(); +struct WorkSpaceLayout *ED_workspace_screen_change_ensure_unused_layout( + struct Main *bmain, + struct WorkSpace *workspace, + struct WorkSpaceLayout *layout_new, + const struct WorkSpaceLayout *layout_fallback_base, + struct wmWindow *win) ATTR_NONNULL(); struct WorkSpaceLayout *ED_workspace_layout_add(struct Main *bmain, struct WorkSpace *workspace, struct wmWindow *win, -- cgit v1.2.3