Skip to content

Commit

Permalink
cocoa: avoid a race that can make a gauge animate backward
Browse files Browse the repository at this point in the history
  • Loading branch information
mflatt committed Dec 5, 2020
1 parent 14e4ebb commit 82a828b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gui-lib/mred/private/wx/cocoa/gauge.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@
(tellv cocoa setMaxValue: #:type _double* rng)
(tellv cocoa setDoubleValue: #:type _double* 0.0)
(tellv cocoa sizeToFit)
;; disable threaded animation to avoid a race initializing
;; a gauge, which can make the gauge appear to run backward:
(tell cocoa setUsesThreadedAnimation: #:type _BOOL #f)
(when (memq 'vertical style)
(let ([r (tell #:type _NSRect cocoa frame)])
(printf "height ~s\n" (NSSize-height (NSRect-size r)))
(tellv cocoa setFrame:
#:type _NSRect (make-NSRect
(NSRect-origin r)
Expand Down

0 comments on commit 82a828b

Please sign in to comment.