< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_List.cpp
Print this page
*** 476,485 ****
--- 476,486 ----
}
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,497 ****
--- 489,499 ----
}
} else {
Select(item);
}
}
+ }
delete msg;
return mrConsume;
}
if (msg->message == WM_KEYDOWN && msg->wParam == VK_RETURN) {
WmNotify(LBN_DBLCLK);
< prev index next >