win32: fix combo-field% click handling

Closes PR 13173

Merge to v5.3.1

original commit: 75008f14d7a46d28262e76de2b9603a54e20c896
This commit is contained in:
Matthew Flatt 2012-10-09 20:04:33 -06:00
parent 2eb1a30a2e
commit 5332e9c927
2 changed files with 6 additions and 3 deletions

View File

@ -90,7 +90,8 @@
is-auto-scroll? is-disabled-scroll?
get-virtual-width get-virtual-height
reset-auto-scroll
refresh-for-autoscroll)
refresh-for-autoscroll
try-mouse)
(define hscroll? (or (memq 'hscroll style)
(memq 'auto-hscroll style)))
@ -238,7 +239,10 @@
[else (super wndproc w msg wParam lParam default)]))
(define/override (wndproc-for-ctlproc w msg wParam lParam default)
(default w msg wParam lParam))
;; act on clicks for a combo field:
(if (try-mouse w msg wParam lParam)
0
(default w msg wParam lParam)))
(define dc (new dc% [canvas this] [transparent? (memq 'transparent style)]))
(send dc start-backing-retained)

View File

@ -20,7 +20,6 @@
(class %
(inherit on-set-focus
on-kill-focus
try-mouse
wndproc)
(init-field [callback void])