racket/gui win32: fix duplicate pre- events for controls

original commit: 7ddd99cf52c5476abead64a23bf441a21dd15507
This commit is contained in:
Matthew Flatt 2012-10-02 07:16:53 -06:00
parent ed25173112
commit 2eb1a30a2e

View File

@ -30,17 +30,15 @@
(super-new) (super-new)
(define/public (ctlproc w msg wParam lParam default) (define/public (ctlproc w msg wParam lParam default)
(if (try-mouse w msg wParam lParam) (cond
0 [(= msg WM_SETFOCUS)
(cond (queue-window-event this (lambda () (on-set-focus)))
[(= msg WM_SETFOCUS) (default w msg wParam lParam)]
(queue-window-event this (lambda () (on-set-focus))) [(= msg WM_KILLFOCUS)
(default w msg wParam lParam)] (queue-window-event this (lambda () (on-kill-focus)))
[(= msg WM_KILLFOCUS) (default w msg wParam lParam)]
(queue-window-event this (lambda () (on-kill-focus))) [else
(default w msg wParam lParam)] (wndproc-for-ctlproc w msg wParam lParam default)]))
[else
(wndproc-for-ctlproc w msg wParam lParam default)])))
(define/public (wndproc-for-ctlproc w msg wParam lParam default) (define/public (wndproc-for-ctlproc w msg wParam lParam default)
(wndproc w msg wParam lParam default)))) (wndproc w msg wParam lParam default))))