Browse Source

Merge branch 'master' into feature/nested-styles-inline

pull/8247/head
Dan Walmsley 4 years ago
committed by GitHub
parent
commit
225cf94c34
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      native/Avalonia.Native/src/OSX/WindowImpl.h
  2. 5
      native/Avalonia.Native/src/OSX/WindowImpl.mm

1
native/Avalonia.Native/src/OSX/WindowImpl.h

@ -13,6 +13,7 @@
class WindowImpl : public virtual WindowBaseImpl, public virtual IAvnWindow, public IWindowStateChanged class WindowImpl : public virtual WindowBaseImpl, public virtual IAvnWindow, public IWindowStateChanged
{ {
private: private:
bool _isEnabled;
bool _canResize; bool _canResize;
bool _fullScreenActive; bool _fullScreenActive;
SystemDecorations _decorations; SystemDecorations _decorations;

5
native/Avalonia.Native/src/OSX/WindowImpl.mm

@ -10,6 +10,7 @@
#include "WindowProtocol.h" #include "WindowProtocol.h"
WindowImpl::WindowImpl(IAvnWindowEvents *events, IAvnGlContext *gl) : WindowBaseImpl(events, gl) { WindowImpl::WindowImpl(IAvnWindowEvents *events, IAvnGlContext *gl) : WindowBaseImpl(events, gl) {
_isEnabled = true;
_children = std::list<WindowImpl*>(); _children = std::list<WindowImpl*>();
_isClientAreaExtended = false; _isClientAreaExtended = false;
_extendClientHints = AvnDefaultChrome; _extendClientHints = AvnDefaultChrome;
@ -76,7 +77,9 @@ HRESULT WindowImpl::SetEnabled(bool enable) {
START_COM_CALL; START_COM_CALL;
@autoreleasepool { @autoreleasepool {
_isEnabled = enable;
[GetWindowProtocol() setEnabled:enable]; [GetWindowProtocol() setEnabled:enable];
UpdateStyle();
return S_OK; return S_OK;
} }
} }
@ -574,7 +577,7 @@ NSWindowStyleMask WindowImpl::GetStyle() {
case SystemDecorationsFull: case SystemDecorationsFull:
s = s | NSWindowStyleMaskTitled | NSWindowStyleMaskClosable; s = s | NSWindowStyleMaskTitled | NSWindowStyleMaskClosable;
if (_canResize) { if (_canResize && _isEnabled) {
s = s | NSWindowStyleMaskResizable; s = s | NSWindowStyleMaskResizable;
} }
break; break;

Loading…
Cancel
Save