|
|
|
@ -54,8 +54,20 @@ HRESULT WindowImpl::Show(bool activate, bool isDialog) { |
|
|
|
|
|
|
|
@autoreleasepool { |
|
|
|
_isDialog = isDialog; |
|
|
|
|
|
|
|
bool created = Window == nullptr; |
|
|
|
|
|
|
|
WindowBaseImpl::Show(activate, isDialog); |
|
|
|
|
|
|
|
if(created) |
|
|
|
{ |
|
|
|
if(_isClientAreaExtended) |
|
|
|
{ |
|
|
|
[GetWindowProtocol() setIsExtended:true]; |
|
|
|
SetExtendClientArea(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
HideOrShowTrafficLights(); |
|
|
|
|
|
|
|
return SetWindowState(_lastWindowState); |
|
|
|
@ -326,37 +338,39 @@ HRESULT WindowImpl::SetExtendClientArea(bool enable) { |
|
|
|
@autoreleasepool { |
|
|
|
_isClientAreaExtended = enable; |
|
|
|
|
|
|
|
if (enable) { |
|
|
|
Window.titleVisibility = NSWindowTitleHidden; |
|
|
|
if(Window != nullptr) { |
|
|
|
if (enable) { |
|
|
|
Window.titleVisibility = NSWindowTitleHidden; |
|
|
|
|
|
|
|
[Window setTitlebarAppearsTransparent:true]; |
|
|
|
[Window setTitlebarAppearsTransparent:true]; |
|
|
|
|
|
|
|
auto wantsTitleBar = (_extendClientHints & AvnSystemChrome) || (_extendClientHints & AvnPreferSystemChrome); |
|
|
|
auto wantsTitleBar = (_extendClientHints & AvnSystemChrome) || (_extendClientHints & AvnPreferSystemChrome); |
|
|
|
|
|
|
|
if (wantsTitleBar) { |
|
|
|
[StandardContainer ShowTitleBar:true]; |
|
|
|
} else { |
|
|
|
[StandardContainer ShowTitleBar:false]; |
|
|
|
} |
|
|
|
if (wantsTitleBar) { |
|
|
|
[StandardContainer ShowTitleBar:true]; |
|
|
|
} else { |
|
|
|
[StandardContainer ShowTitleBar:false]; |
|
|
|
} |
|
|
|
|
|
|
|
if (_extendClientHints & AvnOSXThickTitleBar) { |
|
|
|
Window.toolbar = [NSToolbar new]; |
|
|
|
Window.toolbar.showsBaselineSeparator = false; |
|
|
|
if (_extendClientHints & AvnOSXThickTitleBar) { |
|
|
|
Window.toolbar = [NSToolbar new]; |
|
|
|
Window.toolbar.showsBaselineSeparator = false; |
|
|
|
} else { |
|
|
|
Window.toolbar = nullptr; |
|
|
|
} |
|
|
|
} else { |
|
|
|
Window.titleVisibility = NSWindowTitleVisible; |
|
|
|
Window.toolbar = nullptr; |
|
|
|
[Window setTitlebarAppearsTransparent:false]; |
|
|
|
View.layer.zPosition = 0; |
|
|
|
} |
|
|
|
} else { |
|
|
|
Window.titleVisibility = NSWindowTitleVisible; |
|
|
|
Window.toolbar = nullptr; |
|
|
|
[Window setTitlebarAppearsTransparent:false]; |
|
|
|
View.layer.zPosition = 0; |
|
|
|
} |
|
|
|
|
|
|
|
[GetWindowProtocol() setIsExtended:enable]; |
|
|
|
[GetWindowProtocol() setIsExtended:enable]; |
|
|
|
|
|
|
|
HideOrShowTrafficLights(); |
|
|
|
HideOrShowTrafficLights(); |
|
|
|
|
|
|
|
UpdateStyle(); |
|
|
|
UpdateStyle(); |
|
|
|
} |
|
|
|
|
|
|
|
return S_OK; |
|
|
|
} |
|
|
|
|