Skip to content

Commit

Permalink
Fix: respect CanResize on macOS regardless of SystemDecorations
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndysc committed Oct 27, 2024
1 parent 0944e04 commit eb857ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions native/Avalonia.Native/src/OSX/WindowImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,10 @@
switch (_decorations) {
case SystemDecorationsNone:
s = s | NSWindowStyleMaskFullSizeContentView;

if ((_canResize && _isEnabled) || _transitioningWindowState) {
s = s | NSWindowStyleMaskResizable;
}
break;

case SystemDecorationsBorderOnly:
Expand All @@ -570,13 +574,13 @@

case SystemDecorationsFull:
s = s | NSWindowStyleMaskTitled | NSWindowStyleMaskClosable;

if ((_canResize && _isEnabled) || _transitioningWindowState) {
s = s | NSWindowStyleMaskResizable;
s = s | NSWindowStyleMaskResizable;
}
break;
}


if (!IsOwned()) {
s |= NSWindowStyleMaskMiniaturizable;
}
Expand Down

0 comments on commit eb857ce

Please sign in to comment.