Skip to content

Commit eb3136f

Browse files
committed
fix: macOS build with older SDKs: replace clipsToBounds with layer.masksToBounds
1 parent 6f083f6 commit eb3136f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

graf2d/cocoa/src/QuartzWindow.mm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2615,13 +2615,17 @@ - (BOOL) acceptsCrossingEvents : (unsigned) eventMask
26152615
//______________________________________________________________________________
26162616
- (void)didAddSubview:(NSView *)subview
26172617
{
2618-
self.clipsToBounds = YES;
2618+
[super didAddSubview:subview];
2619+
self.wantsLayer = YES;
2620+
self.layer.masksToBounds = YES;
26192621
}
26202622

26212623
//______________________________________________________________________________
26222624
- (void)willRemoveSubview:(NSView *)subview
26232625
{
2624-
self.clipsToBounds = self.subviews.count > 1;
2626+
[super willRemoveSubview:subview];
2627+
self.wantsLayer = YES;
2628+
self.layer.masksToBounds = self.subviews.count > 1;
26252629
}
26262630

26272631
//______________________________________________________________________________

0 commit comments

Comments
 (0)