Skip to content

Commit 539e7a5

Browse files
danielbraunrogerwang
authored andcommitted
Fix nwjs#2299: Wrong mask logic in window.setResizable
Calling window.setResizable(false) twice causes the window to be resizable, due to wrong XOR bitmask logic. This commit fixes it.
1 parent bcd5e49 commit 539e7a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/native_window_mac.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ - (void)drawRect:(NSRect)dirtyRect {
625625
[window() setStyleMask:window().styleMask | NSResizableWindowMask];
626626
} else {
627627
[[window() standardWindowButton:NSWindowZoomButton] setEnabled:NO];
628-
[window() setStyleMask:window().styleMask ^ NSResizableWindowMask];
628+
[window() setStyleMask:window().styleMask & ~NSResizableWindowMask];
629629
}
630630
}
631631

0 commit comments

Comments
 (0)