@@ -2101,6 +2101,11 @@ boolean setMarkedText_selectedRange (long id, long sel, long string, long range)
2101
2101
void setNeedsDisplay (long id , long sel , boolean flag ) {
2102
2102
if (flag && !isDrawing ()) return ;
2103
2103
NSView view = new NSView (id );
2104
+ /*
2105
+ * Since macOS 14 the clipsToBounds property of NSView has to be set to true
2106
+ * See https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-14
2107
+ */
2108
+ OS .objc_msgSend (id , OS .sel_setClipsToBounds_ , true );
2104
2109
if (flag && display .isPainting .containsObject (view )) {
2105
2110
NSMutableArray needsDisplay = display .needsDisplay ;
2106
2111
if (needsDisplay == null ) {
@@ -2121,6 +2126,11 @@ void setNeedsDisplayInRect (long id, long sel, long arg0) {
2121
2126
NSRect rect = new NSRect ();
2122
2127
OS .memmove (rect , arg0 , NSRect .sizeof );
2123
2128
NSView view = new NSView (id );
2129
+ /*
2130
+ * Since macOS 14 the clipsToBounds property of NSView has to be set to true
2131
+ * See https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-14
2132
+ */
2133
+ OS .objc_msgSend (id , OS .sel_setClipsToBounds_ , true );
2124
2134
if (display .isPainting .containsObject (view )) {
2125
2135
NSMutableArray needsDisplayInRect = display .needsDisplayInRect ;
2126
2136
if (needsDisplayInRect == null ) {
0 commit comments