win32: fix gl canvas repaint

This commit is contained in:
Matthew Flatt 2010-10-13 17:38:49 -06:00
parent 47281a9d2d
commit 3d9f52a4d1

View File

@ -89,6 +89,7 @@
(define hscroll? (memq 'hscroll style))
(define vscroll? (memq 'vscroll style))
(define for-gl? (memq 'gl style))
(define panel-hwnd
(and (memq 'combo style)
@ -155,6 +156,8 @@
[(= msg WM_PAINT)
(let* ([ps (malloc 128)]
[hdc (BeginPaint w ps)])
(if for-gl?
(queue-paint)
(unless (positive? paint-suspended)
(let* ([hbrush (if no-autoclear?
#f
@ -167,7 +170,7 @@
(unless transparent?
(DeleteObject hbrush)))
(unless (do-backing-flush this dc hdc)
(queue-paint))))
(queue-paint)))))
(EndPaint hdc ps))
0]
[(= msg WM_NCPAINT)
@ -254,7 +257,8 @@
(define/override (refresh) (queue-paint))
(define/public (queue-backing-flush)
(InvalidateRect canvas-hwnd #f #f))
(unless for-gl?
(InvalidateRect canvas-hwnd #f #f)))
(define/public (make-compatible-bitmap w h)
(send dc make-backing-bitmap w h))