win32: fix flush and periodic canvas flush
original commit: 64d9a391cfe480fd599910026294cff62cd75ca3
This commit is contained in:
parent
6482978363
commit
929595edaf
|
@ -252,6 +252,11 @@
|
||||||
(define/public (end-refresh-sequence)
|
(define/public (end-refresh-sequence)
|
||||||
(send dc resume-flush))
|
(send dc resume-flush))
|
||||||
|
|
||||||
|
;; Improve this method to flush locally
|
||||||
|
;; instead of globally:
|
||||||
|
(define/public (flush)
|
||||||
|
(flush-display))
|
||||||
|
|
||||||
(define/public (on-paint) (void))
|
(define/public (on-paint) (void))
|
||||||
(define/override (refresh) (queue-paint))
|
(define/override (refresh) (queue-paint))
|
||||||
|
|
||||||
|
@ -268,7 +273,8 @@
|
||||||
(do-backing-flush this dc hdc)
|
(do-backing-flush this dc hdc)
|
||||||
(let ([hdc (GetDC canvas-hwnd)])
|
(let ([hdc (GetDC canvas-hwnd)])
|
||||||
(do-backing-flush this dc hdc)
|
(do-backing-flush this dc hdc)
|
||||||
(ReleaseDC canvas-hwnd hdc))))
|
(ReleaseDC canvas-hwnd hdc)
|
||||||
|
(ValidateRect canvas-hwnd #f))))
|
||||||
|
|
||||||
(define/public (make-compatible-bitmap w h)
|
(define/public (make-compatible-bitmap w h)
|
||||||
(send dc make-backing-bitmap w h))
|
(send dc make-backing-bitmap w h))
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
get-control-font-size
|
get-control-font-size
|
||||||
get-control-font-size-in-pixels?
|
get-control-font-size-in-pixels?
|
||||||
cancel-quit
|
cancel-quit
|
||||||
flush-display
|
|
||||||
bell
|
bell
|
||||||
hide-cursor
|
hide-cursor
|
||||||
get-display-depth
|
get-display-depth
|
||||||
|
@ -44,6 +43,7 @@
|
||||||
get-highlight-background-color
|
get-highlight-background-color
|
||||||
get-highlight-text-color
|
get-highlight-text-color
|
||||||
check-for-break)
|
check-for-break)
|
||||||
|
flush-display
|
||||||
fill-private-color
|
fill-private-color
|
||||||
play-sound
|
play-sound
|
||||||
location->window
|
location->window
|
||||||
|
@ -84,7 +84,6 @@
|
||||||
(define (get-control-font-face) (get-theme-font-face))
|
(define (get-control-font-face) (get-theme-font-face))
|
||||||
(define (get-control-font-size) (get-theme-font-size))
|
(define (get-control-font-size) (get-theme-font-size))
|
||||||
(define (get-control-font-size-in-pixels?) #t)
|
(define (get-control-font-size-in-pixels?) #t)
|
||||||
(define (flush-display) (void))
|
|
||||||
|
|
||||||
(define-user32 MessageBeep (_wfun _UINT -> _BOOL))
|
(define-user32 MessageBeep (_wfun _UINT -> _BOOL))
|
||||||
(define (bell)
|
(define (bell)
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
GetDC
|
GetDC
|
||||||
ReleaseDC
|
ReleaseDC
|
||||||
InvalidateRect
|
InvalidateRect
|
||||||
|
ValidateRect
|
||||||
GetMenuState
|
GetMenuState
|
||||||
CheckMenuItem
|
CheckMenuItem
|
||||||
ModifyMenuW
|
ModifyMenuW
|
||||||
|
@ -121,6 +122,8 @@
|
||||||
|
|
||||||
(define-user32 InvalidateRect (_wfun _HWND (_or-null _RECT-pointer) _BOOL -> (r : _BOOL)
|
(define-user32 InvalidateRect (_wfun _HWND (_or-null _RECT-pointer) _BOOL -> (r : _BOOL)
|
||||||
-> (unless r (failed 'InvalidateRect))))
|
-> (unless r (failed 'InvalidateRect))))
|
||||||
|
(define-user32 ValidateRect (_wfun _HWND (_or-null _RECT-pointer) -> (r : _BOOL)
|
||||||
|
-> (unless r (failed 'ValidateRect))))
|
||||||
|
|
||||||
(define-user32 GetMenuState (_wfun _HMENU _UINT _UINT -> _UINT))
|
(define-user32 GetMenuState (_wfun _HMENU _UINT _UINT -> _UINT))
|
||||||
(define-user32 CheckMenuItem (_wfun _HMENU _UINT _UINT -> _DWORD))
|
(define-user32 CheckMenuItem (_wfun _HMENU _UINT _UINT -> _DWORD))
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
queue-window-event
|
queue-window-event
|
||||||
queue-window-refresh-event
|
queue-window-refresh-event
|
||||||
location->window
|
location->window
|
||||||
|
flush-display
|
||||||
|
|
||||||
GetWindowRect
|
GetWindowRect
|
||||||
GetClientRect))
|
GetClientRect))
|
||||||
|
@ -700,4 +701,8 @@
|
||||||
(and hwnd
|
(and hwnd
|
||||||
(or (let ([wx (any-hwnd->wx hwnd)])
|
(or (let ([wx (any-hwnd->wx hwnd)])
|
||||||
(and wx (send wx get-top-frame)))
|
(and wx (send wx get-top-frame)))
|
||||||
(loop (GetParent hwnd)))))))
|
(loop (GetParent hwnd)))))))
|
||||||
|
|
||||||
|
(define (flush-display)
|
||||||
|
(atomically
|
||||||
|
(pre-event-sync #t)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user