diff --git a/collects/mred/private/wx/win32/canvas.rkt b/collects/mred/private/wx/win32/canvas.rkt index cfaf727a..92e3c78b 100644 --- a/collects/mred/private/wx/win32/canvas.rkt +++ b/collects/mred/private/wx/win32/canvas.rkt @@ -155,23 +155,24 @@ [(= msg WM_PAINT) (let* ([ps (malloc 128)] [hdc (BeginPaint w ps)]) - (if for-gl? - (queue-paint) - (if (positive? paint-suspended) - (set! suspended-refresh? #t) - (let* ([hbrush (if no-autoclear? - #f - (if transparent? - background-hbrush - (CreateSolidBrush bg-colorref)))]) - (when hbrush - (let ([r (GetClientRect canvas-hwnd)]) - (FillRect hdc r hbrush)) - (unless transparent? - (DeleteObject hbrush))) - (unless (do-canvas-backing-flush hdc) - (queue-paint))))) - (EndPaint hdc ps)) + (when hdc + (if for-gl? + (queue-paint) + (if (positive? paint-suspended) + (set! suspended-refresh? #t) + (let* ([hbrush (if no-autoclear? + #f + (if transparent? + background-hbrush + (CreateSolidBrush bg-colorref)))]) + (when hbrush + (let ([r (GetClientRect canvas-hwnd)]) + (FillRect hdc r hbrush)) + (unless transparent? + (DeleteObject hbrush))) + (unless (do-canvas-backing-flush hdc) + (queue-paint))))) + (EndPaint hdc ps))) 0] [(= msg WM_NCPAINT) (if control-border-theme diff --git a/collects/mred/private/wx/win32/window.rkt b/collects/mred/private/wx/win32/window.rkt index 71e6ac5d..8f5086bc 100644 --- a/collects/mred/private/wx/win32/window.rkt +++ b/collects/mred/private/wx/win32/window.rkt @@ -56,8 +56,6 @@ -> (unless r (failed 'ClientToScreen)))) (define-gdi32 CreateFontIndirectW (_wfun _LOGFONT-pointer -> _HFONT)) -(define-user32 FillRect (_wfun _HDC _RECT-pointer _HBRUSH -> (r : _int) - -> (when (zero? r) (failed 'FillRect)))) (define-shell32 DragAcceptFiles (_wfun _HWND _BOOL -> _void))