diff options
author | Julian Eisel <julian@blender.org> | 2020-08-04 20:46:38 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-08-04 21:12:07 +0300 |
commit | 304767dcd3459d222d8c6011e913840df74a6cd5 (patch) | |
tree | 00bf40c9e8514ff234b0ea35770b680d5a1f5ab5 /source/blender/editors/include | |
parent | 0d3b5a50689187e574355b925225e1f909144c77 (diff) |
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.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 6 |
1 files changed, 6 insertions, 0 deletions
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, |