Cocoa: avoid backing-dc failure on zero-sized canvas
Closes https://github.com/racket/racket#1255
This commit is contained in:
parent
c8c8ce64eb
commit
be30bf721d
|
@ -153,9 +153,11 @@
|
|||
(display-bitmap-resolution 0 void)))
|
||||
|
||||
(define (make-window-bitmap w h win [trans? #t] [flipped? #f])
|
||||
(if win
|
||||
(make-object layer-bitmap% w h win trans? flipped?)
|
||||
(make-screen-bitmap w h)))
|
||||
(let ([w (max 1 w)]
|
||||
[h (max 1 h)])
|
||||
(if win
|
||||
(make-object layer-bitmap% w h win trans? flipped?)
|
||||
(make-screen-bitmap w h))))
|
||||
|
||||
(define layer-bitmap%
|
||||
(class quartz-bitmap%
|
||||
|
|
Loading…
Reference in New Issue
Block a user