JBR-3366 SIGILL at [libsystem_kernel] __kill in NSWindowStyleMaskFullScreen cleared on a window outside of a full screen transition

Wrapped the native exception and added logging

JBR-4882 Unable to exit fullscreen mode after Presentation mode was entered (and exited) on macOS

(cherry picked from commit d57e8b631b)
(cherry picked from commit 5bfbdd28f2)
This commit is contained in:
Alexey Ushakov
2022-03-16 15:47:19 +01:00
committed by jbrbot
parent 0e0cdc2791
commit 4ba5a188d4

View File

@@ -1686,7 +1686,10 @@ JNI_COCOA_ENTER(env);
// resets the NSWindow's style mask if the mask intersects any of those bits
if (mask & MASK(_STYLE_PROP_BITMASK)) {
[nsWindow setStyleMask:[AWTWindow styleMaskForStyleBits:newBits]];
NSWindowStyleMask styleMask = [AWTWindow styleMaskForStyleBits:newBits];
NSWindowStyleMask curMask = nsWindow.styleMask;
// NSWindowStyleMaskFullScreen bit shouldn't be updated directly
[nsWindow setStyleMask:(styleMask & ~NSWindowStyleMaskFullScreen | curMask & NSWindowStyleMaskFullScreen)];
}
// calls methods on NSWindow to change other properties, based on the mask