Skip to content

Commit 97a04c6

Browse files
committed
[OSX] dont allow disabled windows to resize.
1 parent 651c4be commit 97a04c6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
class WindowImpl : public virtual WindowBaseImpl, public virtual IAvnWindow, public IWindowStateChanged
1414
{
1515
private:
16+
bool _isEnabled;
1617
bool _canResize;
1718
bool _fullScreenActive;
1819
SystemDecorations _decorations;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "WindowProtocol.h"
1010

1111
WindowImpl::WindowImpl(IAvnWindowEvents *events, IAvnGlContext *gl) : WindowBaseImpl(events, gl) {
12+
_isEnabled = true;
1213
_children = std::list<WindowImpl*>();
1314
_isClientAreaExtended = false;
1415
_extendClientHints = AvnDefaultChrome;
@@ -75,7 +76,9 @@
7576
START_COM_CALL;
7677

7778
@autoreleasepool {
79+
_isEnabled = enable;
7880
[GetWindowProtocol() setEnabled:enable];
81+
UpdateStyle();
7982
return S_OK;
8083
}
8184
}
@@ -573,7 +576,7 @@
573576
case SystemDecorationsFull:
574577
s = s | NSWindowStyleMaskTitled | NSWindowStyleMaskClosable;
575578

576-
if (_canResize) {
579+
if (_canResize && _isEnabled) {
577580
s = s | NSWindowStyleMaskResizable;
578581
}
579582
break;

0 commit comments

Comments
 (0)