racket/gui win32: enable clipping-problem workaround for 32-bit mode
The specialization to Win64 to work around a Cairo clipping problem probably had more to do with the version of Cairo, instead of the variant of Windows, since both variants need the workarounds after a Cairo upgrade. original commit: 641fa5f744bc61916c257ed8ca59f7480a91a75f
This commit is contained in:
parent
3404c0084b
commit
fa43134aa8
|
@ -31,6 +31,8 @@
|
|||
|
||||
(define hwnd-param (make-parameter #f))
|
||||
|
||||
(define need-clip-workarounds? #t)
|
||||
|
||||
(define win32-bitmap%
|
||||
(class win32-no-hwnd-bitmap%
|
||||
(init w h hwnd [gl-config #f])
|
||||
|
@ -74,9 +76,8 @@
|
|||
;; Work around a Cairo(?) bug. When a clipping
|
||||
;; region is set, we draw text, and then the clipping
|
||||
;; region is changed, the change doesn't take
|
||||
;; until we draw more text --- but only under Win64,
|
||||
;; and only with DDB surfaces.
|
||||
(when win64?
|
||||
;; until we draw more text --- but only with DDB surfaces.
|
||||
(when need-clip-workarounds?
|
||||
(let ([bm (internal-get-bitmap)])
|
||||
(when (bm . is-a? . win32-bitmap%)
|
||||
(SelectClipRgn (cairo_win32_surface_get_dc
|
||||
|
@ -130,11 +131,11 @@
|
|||
(define sh (->screen (unbox h)))
|
||||
(define r (make-RECT 0 0 sw sh))
|
||||
(define clip-type
|
||||
(if win64?
|
||||
(if need-clip-workarounds?
|
||||
(GetClipBox hdc r)
|
||||
SIMPLEREGION))
|
||||
(cond
|
||||
[(and win64?
|
||||
[(and need-clip-workarounds?
|
||||
(not (and (= clip-type SIMPLEREGION)
|
||||
(= (RECT-left r) 0)
|
||||
(= (RECT-top r) 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user