diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-11-04 20:59:59 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-11-04 23:01:38 +0300 |
commit | ef7fd50f8a9317f363eaeb29101cd7fce1111ff4 (patch) | |
tree | 367647df55a77e5a825b776b6a7e2d33c6f8d081 /source/blender/makesdna/DNA_space_types.h | |
parent | 4b337a86f1dc230d6eb1720c8896b6cca26a2e72 (diff) |
UI: Rewrite stacked full-screen logic, fixing issues
To recreate the main issue:
* Set render and file browser to show in full-screen in the preferences
* Default scene, press F12 in 3D View
* Press Alt+S to save the image
* Escape the file browser
* Escape the image editor
The former 3D View would now show the image editor. This is a common
use-case that should work.
Full-screen code is a hassle to get to work as expected. There are
reports from 2.5, I did lots of work years ago to get these kind of
use-cases to work fine. But apparently I broke this one with a fix for
another common use-case in March (0a28bb14222c).
This now stores hints in the space, rather than the area, which should
make things much more controlable and hopefully help us fix issues like
this.
Here are a few references describing further common issues (all should
work fine now): 0a28bb14222c, e61588c5a544, T19296
Checked over this with Bastien, we agreed that at some point we should
do a big rewrite of all of this, for now this is acceptable.
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 0f957a946d9..82f6da8bb46 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -79,6 +79,22 @@ typedef struct SpaceLink { char _pad0[6]; } SpaceLink; +/* SpaceLink.link_flag */ +enum { + /** + * The space is not a regular one opened through the editor menu (for example) but spawned by an + * operator to fulfill some task and then disappear again. Can typically be cancelled using Esc, + * but that is handled on the editor level. */ + SPACE_FLAG_TYPE_TEMPORARY = (1 << 0), + /** + * Used to mark a space as active but "overlapped" by temporary fullscreen spaces. Without this + * we wouldn't be able to restore the correct active space after closing temp fullscreens + * reliably if the same space type is opened twice in a fullscreen stack (see T19296). We don't + * actually open the same space twice, we have to pretend it is by managing area order carefully. + */ + SPACE_FLAG_TYPE_WAS_ACTIVE = (1 << 1), +}; + /** \} */ /* -------------------------------------------------------------------- */ |