Don't send listbox selection events when mouse wasn't clicked on an item.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jun 2010 22:58:09 +0000 (22:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jun 2010 22:58:09 +0000 (22:58 +0000)
commitf186bd4d4035909759af0e5e9fcfd958a879ed6f
treed73c73b4a94e73a9b4e593d8abc4c891ba1080c2
parentf2eb4ad2267c8dfd04288c0eb7be10ce1da240e6
Don't send listbox selection events when mouse wasn't clicked on an item.

Windows sends events even if the mouse is clicked in the area below the items,
filter them out by checking the item under the mouse ourselves.

Also use synchronous GetMessagePos() function to get the mouse position
instead of the asynchronous GetCursorPos() which was wrongly used by the old
code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/listbox.cpp