From 84fb22abafb565297eedd4828d7b6c7d79cbf06d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 25 Sep 2014 15:15:22 -0600 Subject: [PATCH] racket/gui Windows: rely on patched Cairo instead of workaround original commit: 3ad2cb83bba522fb91f33bc1a3d061ed3a6bfac3 --- pkgs/gui-pkgs/gui-lib/mred/private/wx/win32/dc.rkt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/gui-pkgs/gui-lib/mred/private/wx/win32/dc.rkt b/pkgs/gui-pkgs/gui-lib/mred/private/wx/win32/dc.rkt index 7b287b45..15d05b86 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/private/wx/win32/dc.rkt +++ b/pkgs/gui-pkgs/gui-lib/mred/private/wx/win32/dc.rkt @@ -31,7 +31,8 @@ (define hwnd-param (make-parameter #f)) -(define need-clip-workarounds? #t) +(define need-clip-text-workaround? #t) +(define need-clip-refresh-workaround? #f) ; patched Cairo (define win32-bitmap% (class win32-no-hwnd-bitmap% @@ -77,7 +78,7 @@ ;; 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 with DDB surfaces. - (when need-clip-workarounds? + (when need-clip-text-workaround? (let ([bm (internal-get-bitmap)]) (when (bm . is-a? . win32-bitmap%) (SelectClipRgn (cairo_win32_surface_get_dc @@ -131,11 +132,11 @@ (define sh (->screen (unbox h))) (define r (make-RECT 0 0 sw sh)) (define clip-type - (if need-clip-workarounds? + (if need-clip-refresh-workaround? (GetClipBox hdc r) SIMPLEREGION)) (cond - [(and need-clip-workarounds? + [(and need-clip-refresh-workaround? (not (and (= clip-type SIMPLEREGION) (= (RECT-left r) 0) (= (RECT-top r) 0)