Cocoa: avoid over-eager refresh on OS X 10.11
A relatively late correction to refresh handling for El Capitan
(commit 9bf18505d5
) causes a canvas to be refreshed too often
in some cases. Delay the refresh to restore the old timing
without the old bug.
This commit is contained in:
parent
facc07e123
commit
3873064c80
|
@ -430,7 +430,10 @@
|
|||
(tellv cocoa enableFlushWindow)
|
||||
(when (version-10.11-or-later?)
|
||||
(tellv cocoa setAutodisplay: #:type _BOOL #t)
|
||||
(tellv cocoa displayIfNeeded))))
|
||||
(queue-window-refresh-event
|
||||
this
|
||||
(lambda ()
|
||||
(tellv cocoa displayIfNeeded))))))
|
||||
|
||||
(define/public (force-window-focus)
|
||||
(let ([next (get-app-front-window)])
|
||||
|
|
|
@ -306,14 +306,14 @@
|
|||
(maybe-reset-size))))))
|
||||
|
||||
(define/private (maybe-reset-size)
|
||||
(begin-refresh-sequence)
|
||||
(let-boxes ([w 0]
|
||||
[h 0])
|
||||
(get-size w h)
|
||||
(unless (and (= w lastwidth)
|
||||
(= h lastheight))
|
||||
(reset-size)))
|
||||
(end-refresh-sequence))
|
||||
(begin-refresh-sequence)
|
||||
(reset-size)
|
||||
(end-refresh-sequence))))
|
||||
|
||||
(define/private (reset-size)
|
||||
(reset-visual #f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user