Skip to content

Commit ffd9908

Browse files
committed
Mac OS: scrolling panels need to clip to content in macOS 14 and later
1 parent a5bde36 commit ffd9908

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

gui-lib/mred/private/wx/cocoa/canvas.rkt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,10 @@
473473

474474
(send dc start-backing-retained)
475475

476+
(when (and (version-14.0-or-later?)
477+
(is-panel?))
478+
(tellv content-cocoa setClipsToBounds: #:type _BOOL #true))
479+
476480
(queue-paint)
477481

478482
(define/public (is-panel?) #f)

gui-lib/mred/private/wx/cocoa/utils.rkt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
version-11.0-or-later?
3737
version-12.0-or-later?
3838
version-13.0-or-later?
39+
version-14.0-or-later?
3940
version-26.0-or-later?)
4041
with-autorelease
4142
call-with-autorelease
@@ -117,5 +118,7 @@
117118
(NSAppKitVersionNumber . >= . 2100))
118119
(define (version-13.0-or-later?) ; Ventura
119120
(NSAppKitVersionNumber . >= . 2200))
121+
(define (version-14.0-or-later?) ; Sonoma
122+
(NSAppKitVersionNumber . >= . 2400))
120123
(define (version-26.0-or-later?) ; Tahoe
121124
(NSAppKitVersionNumber . >= . 2600))

0 commit comments

Comments
 (0)