Browse Source

Don't overwrite unrelated style mask bits.

Fixes a problem where we were clearing the fullscreen flag erroneously during a fullscreen transition, and in general it's best to preserve flags we're not interested in controlling anyway.
pull/10265/head
Steven Kirk 4 years ago
parent
commit
1abb1abaf5
  1. 14
      native/Avalonia.Native/src/OSX/WindowImpl.mm

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

@ -561,13 +561,15 @@ bool WindowImpl::IsOwned() {
}
NSWindowStyleMask WindowImpl::CalculateStyleMask() {
unsigned long s = NSWindowStyleMaskBorderless;
// Use the current style mask and only clear the flags we're going to be modifying.
unsigned long s = [Window styleMask] &
~(NSWindowStyleMaskFullSizeContentView |
NSWindowStyleMaskTitled |
NSWindowStyleMaskClosable |
NSWindowStyleMaskResizable |
NSWindowStyleMaskMiniaturizable |
NSWindowStyleMaskTexturedBackground);
if(_actualWindowState == FullScreen)
{
s |= NSWindowStyleMaskFullScreen;
}
switch (_decorations) {
case SystemDecorationsNone:
s = s | NSWindowStyleMaskFullSizeContentView;

Loading…
Cancel
Save