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.
This commit is contained in:
parent
ce11640eef
commit
60bf482dba
Notes:
blender-bot
2023-02-14 11:42:40 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83 Referenced by issue #74101, Closing secondary full screen window destroys main Blender window too
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue