cocoa ppc repairs

original commit: f57961fba436e059877ef8234930f54bd58dff60
This commit is contained in:
Matthew Flatt 2010-10-24 12:12:06 -06:00
parent 31a364e892
commit 4dfe6826a0

View File

@ -655,11 +655,12 @@
(define/public (screen-to-client xb yb)
(let ([p (tell #:type _NSPoint (get-cocoa-content)
convertPointFromBase: #:type _NSPoint
convertPoint: #:type _NSPoint
(tell #:type _NSPoint (get-cocoa-window)
convertScreenToBase:
#:type _NSPoint (make-NSPoint (unbox xb)
(send (get-wx-window) flip-screen (unbox yb)))))])
(send (get-wx-window) flip-screen (unbox yb))))
fromView: #f)])
(set-box! xb (inexact->exact (floor (NSPoint-x p))))
(set-box! yb (inexact->exact (floor (flip-client (NSPoint-y p)))))))
@ -668,8 +669,9 @@
convertBaseToScreen:
#:type _NSPoint
(tell #:type _NSPoint (get-cocoa-content)
convertPointToBase: #:type _NSPoint
(make-NSPoint (unbox xb) (flip-client (unbox yb)))))])
convertPoint: #:type _NSPoint
(make-NSPoint (unbox xb) (flip-client (unbox yb)))
toView: #f))])
(let ([new-y (if flip-y?
(send (get-wx-window) flip-screen (NSPoint-y p))
(NSPoint-y p))])