another cocoa refresh repair
original commit: 909ee0f32dc046f5d25338687146edca84278ab0
This commit is contained in:
parent
8a6417f3e6
commit
ceddc9fbf5
|
@ -23,6 +23,7 @@
|
|||
|
||||
(define _CGContextRef (_cpointer 'CGContextRef))
|
||||
(define-appserv CGContextSynchronize (_fun _CGContextRef -> _void))
|
||||
(define-appserv CGContextFlush (_fun _CGContextRef -> _void))
|
||||
(define-appserv CGContextTranslateCTM (_fun _CGContextRef _CGFloat _CGFloat -> _void))
|
||||
(define-appserv CGContextScaleCTM (_fun _CGContextRef _CGFloat _CGFloat -> _void))
|
||||
(define-appserv CGContextSaveGState (_fun _CGContextRef -> _void))
|
||||
|
@ -89,6 +90,7 @@
|
|||
(define/override (suspend-flush)
|
||||
(atomically
|
||||
(when (zero? suspend-count)
|
||||
(when req (cancel-flush-delay req))
|
||||
(set! req (request-flush-delay (send canvas get-cocoa-window))))
|
||||
(set! suspend-count (add1 suspend-count))
|
||||
(super suspend-flush)))
|
||||
|
|
|
@ -449,19 +449,7 @@
|
|||
;; Called in Cocoa event-handling mode
|
||||
#f)
|
||||
|
||||
(define/private (pre-event-refresh)
|
||||
;; Since we break the connection between the
|
||||
;; Cocoa queue and event handling, we'd like to
|
||||
;; re-sync the display in case a stream of
|
||||
;; events (e.g., key repeat) have a corersponding
|
||||
;; stream of screen updates.
|
||||
(try-to-sync-refresh)
|
||||
(let ([cocoa-win (get-cocoa-window)])
|
||||
(when cocoa-win
|
||||
(tellv cocoa-win flushWindowIfNeeded))))
|
||||
|
||||
(define/public (dispatch-on-char/sync e)
|
||||
(pre-event-refresh)
|
||||
(dispatch-on-char e #f))
|
||||
(define/public (dispatch-on-char e just-pre?)
|
||||
(cond
|
||||
|
@ -471,7 +459,6 @@
|
|||
[else (when enabled? (on-char e)) #t]))
|
||||
|
||||
(define/public (dispatch-on-event/sync e)
|
||||
(pre-event-refresh)
|
||||
(dispatch-on-event e #f))
|
||||
(define/public (dispatch-on-event e just-pre?)
|
||||
(cond
|
||||
|
|
Loading…
Reference in New Issue
Block a user