|
|
|
@ -38,7 +38,16 @@ WindowBaseImpl::WindowBaseImpl(IAvnWindowBaseEvents *events, IAvnGlContext *gl, |
|
|
|
lastMenu = nullptr; |
|
|
|
|
|
|
|
CreateNSWindow(usePanel); |
|
|
|
InitialiseNSWindow(); |
|
|
|
|
|
|
|
[Window setContentView:StandardContainer]; |
|
|
|
[Window setStyleMask:NSWindowStyleMaskBorderless]; |
|
|
|
[Window setBackingType:NSBackingStoreBuffered]; |
|
|
|
|
|
|
|
[Window setContentMinSize:lastMinSize]; |
|
|
|
[Window setContentMaxSize:lastMaxSize]; |
|
|
|
|
|
|
|
[Window setOpaque:false]; |
|
|
|
[Window setHasShadow:true]; |
|
|
|
} |
|
|
|
|
|
|
|
HRESULT WindowBaseImpl::ObtainNSViewHandle(void **ret) { |
|
|
|
@ -568,31 +577,6 @@ void WindowBaseImpl::CreateNSWindow(bool isDialog) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void WindowBaseImpl::InitialiseNSWindow() { |
|
|
|
if(Window != nullptr) { |
|
|
|
[Window setContentView:StandardContainer]; |
|
|
|
[Window setStyleMask:NSWindowStyleMaskBorderless]; |
|
|
|
[Window setBackingType:NSBackingStoreBuffered]; |
|
|
|
|
|
|
|
[Window setContentSize:lastSize]; |
|
|
|
[Window setContentMinSize:lastMinSize]; |
|
|
|
[Window setContentMaxSize:lastMaxSize]; |
|
|
|
|
|
|
|
[Window setOpaque:false]; |
|
|
|
|
|
|
|
[Window setHasShadow:true]; |
|
|
|
[Window invalidateShadow]; |
|
|
|
|
|
|
|
if (lastMenu != nullptr) { |
|
|
|
[GetWindowProtocol() applyMenu:lastMenu]; |
|
|
|
|
|
|
|
if ([Window isKeyWindow]) { |
|
|
|
[GetWindowProtocol() showWindowMenuWithAppMenu]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
id <AvnWindowProtocol> WindowBaseImpl::GetWindowProtocol() { |
|
|
|
if(Window == nullptr) |
|
|
|
{ |
|
|
|
|