Browse Source
Merge branch 'master' into feature/nested-styles-inline
pull/8247/head
Dan Walmsley
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
1 deletions
-
native/Avalonia.Native/src/OSX/WindowImpl.h
-
native/Avalonia.Native/src/OSX/WindowImpl.mm
|
|
|
@ -13,6 +13,7 @@ |
|
|
|
class WindowImpl : public virtual WindowBaseImpl, public virtual IAvnWindow, public IWindowStateChanged |
|
|
|
{ |
|
|
|
private: |
|
|
|
bool _isEnabled; |
|
|
|
bool _canResize; |
|
|
|
bool _fullScreenActive; |
|
|
|
SystemDecorations _decorations; |
|
|
|
|
|
|
|
@ -10,6 +10,7 @@ |
|
|
|
#include "WindowProtocol.h" |
|
|
|
|
|
|
|
WindowImpl::WindowImpl(IAvnWindowEvents *events, IAvnGlContext *gl) : WindowBaseImpl(events, gl) { |
|
|
|
_isEnabled = true; |
|
|
|
_children = std::list<WindowImpl*>(); |
|
|
|
_isClientAreaExtended = false; |
|
|
|
_extendClientHints = AvnDefaultChrome; |
|
|
|
@ -76,7 +77,9 @@ HRESULT WindowImpl::SetEnabled(bool enable) { |
|
|
|
START_COM_CALL; |
|
|
|
|
|
|
|
@autoreleasepool { |
|
|
|
_isEnabled = enable; |
|
|
|
[GetWindowProtocol() setEnabled:enable]; |
|
|
|
UpdateStyle(); |
|
|
|
return S_OK; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -574,7 +577,7 @@ NSWindowStyleMask WindowImpl::GetStyle() { |
|
|
|
case SystemDecorationsFull: |
|
|
|
s = s | NSWindowStyleMaskTitled | NSWindowStyleMaskClosable; |
|
|
|
|
|
|
|
if (_canResize) { |
|
|
|
if (_canResize && _isEnabled) { |
|
|
|
s = s | NSWindowStyleMaskResizable; |
|
|
|
} |
|
|
|
break; |
|
|
|
|