|
|
|
@ -21,9 +21,6 @@ WindowImpl::WindowImpl(IAvnWindowEvents *events, IAvnGlContext *gl) : WindowBase |
|
|
|
_actualWindowState = Normal; |
|
|
|
_lastTitle = @""; |
|
|
|
WindowEvents = events; |
|
|
|
[Window disableCursorRects]; |
|
|
|
[Window setTabbingMode:NSWindowTabbingModeDisallowed]; |
|
|
|
[Window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; |
|
|
|
} |
|
|
|
|
|
|
|
void WindowImpl::HideOrShowTrafficLights() { |
|
|
|
@ -51,25 +48,29 @@ void WindowImpl::HideOrShowTrafficLights() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void WindowImpl::OnInitialiseNSWindow(){ |
|
|
|
[GetWindowProtocol() setCanBecomeKeyWindow:true]; |
|
|
|
[Window disableCursorRects]; |
|
|
|
[Window setTabbingMode:NSWindowTabbingModeDisallowed]; |
|
|
|
[Window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; |
|
|
|
|
|
|
|
[Window setTitle:_lastTitle]; |
|
|
|
|
|
|
|
if(_isClientAreaExtended) |
|
|
|
{ |
|
|
|
[GetWindowProtocol() setIsExtended:true]; |
|
|
|
SetExtendClientArea(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
HRESULT WindowImpl::Show(bool activate, bool isDialog) { |
|
|
|
START_COM_CALL; |
|
|
|
|
|
|
|
@autoreleasepool { |
|
|
|
_isDialog = isDialog; |
|
|
|
|
|
|
|
bool created = Window == nullptr; |
|
|
|
|
|
|
|
WindowBaseImpl::Show(activate, isDialog); |
|
|
|
|
|
|
|
if(created) |
|
|
|
{ |
|
|
|
if(_isClientAreaExtended) |
|
|
|
{ |
|
|
|
[GetWindowProtocol() setIsExtended:true]; |
|
|
|
SetExtendClientArea(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
HideOrShowTrafficLights(); |
|
|
|
|
|
|
|
return SetWindowState(_lastWindowState); |
|
|
|
|