Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-06-10 19:05:30 +0300
committerJulian Eisel <julian@blender.org>2020-06-10 19:40:05 +0300
commit4b39de677d206afb99360665207498bb74c90893 (patch)
tree8957edfc84e02fbca553fe88ba451f27fde02ce3 /intern
parent84d4447bc5220246f9d16ae3e91419af47b37b58 (diff)
Fix T74101: File Browser in macOS fullscreen crashes or makes windows unusable
When closing the File Browser window after making it fullscreen, Blender would either crash or all windows would disappear, with no obvious way to bring them back. The "fix" is to not allow fullscreen for File Browsers (or any future "dialog" windows), but only maximizing. From what I can tell that's how secondary windows are supposed to work on macOS. What we previously did seemed like something macOS doesn't handle cleanly, and I didn't find a simple way to do so on our side.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 05adc41cb8e..62b0e48a7c1 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -411,17 +411,17 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
NSTIFFPboardType,
nil]];
- if (state != GHOST_kWindowStateFullScreen) {
+ if (is_dialog && parentWindow) {
+ [parentWindow->getCocoaWindow() addChildWindow:m_window ordered:NSWindowAbove];
+ [m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
+ }
+ else if (state != GHOST_kWindowStateFullScreen) {
[m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
}
if (state == GHOST_kWindowStateFullScreen)
setState(GHOST_kWindowStateFullScreen);
- if (is_dialog && parentWindow) {
- [parentWindow->getCocoaWindow() addChildWindow:m_window ordered:NSWindowAbove];
- }
-
setNativePixelSize();
[pool drain];