cocoa get-display-size: use screen with menu bar
original commit: 158d119b12a0fe1a41211dcc7152a705c1935c37
This commit is contained in:
parent
2a3bdeb69b
commit
9faffb56b7
|
@ -103,9 +103,12 @@
|
||||||
(set-box! xb 0)
|
(set-box! xb 0)
|
||||||
(set-box! yb 0))
|
(set-box! yb 0))
|
||||||
(define (display-size xb yb v)
|
(define (display-size xb yb v)
|
||||||
(let ([f (tell #:type _NSRect (tell NSScreen mainScreen) frame)])
|
(atomically
|
||||||
(set-box! xb (->long (NSSize-width (NSRect-size f))))
|
(with-autorelease
|
||||||
(set-box! yb (->long (NSSize-height (NSRect-size f))))))
|
(let* ([screen (tell (tell NSScreen screens) objectAtIndex: #:type _NSUInteger 0)]
|
||||||
|
[f (tell #:type _NSRect screen frame)])
|
||||||
|
(set-box! xb (->long (NSSize-width (NSRect-size f))))
|
||||||
|
(set-box! yb (->long (NSSize-height (NSRect-size f))))))))
|
||||||
|
|
||||||
(define-appkit NSBeep (_fun -> _void))
|
(define-appkit NSBeep (_fun -> _void))
|
||||||
(define (bell) (NSBeep))
|
(define (bell) (NSBeep))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user