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
{
private:
bool _isEnabled;
bool _canResize;
bool _fullScreenActive;
SystemDecorations _decorations;

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

@ -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;

Loading…
Cancel
Save