< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_List.cpp
Print this page
@@ -476,10 +476,11 @@
}
MsgRouting AwtList::HandleEvent(MSG *msg, BOOL synthetic)
{
if (IsFocusingMouseMessage(msg)) {
+ if (GetCount() > 0) {
LONG item = static_cast<LONG>(SendListMessage(LB_ITEMFROMPOINT, 0, msg->lParam));
if (item != LB_ERR) {
if (isMultiSelect) {
if (IsItemSelected(item)) {
Deselect(item);
@@ -488,10 +489,11 @@
}
} else {
Select(item);
}
}
+ }
delete msg;
return mrConsume;
}
if (msg->message == WM_KEYDOWN && msg->wParam == VK_RETURN) {
WmNotify(LBN_DBLCLK);
< prev index next >