Only capture mouse when an item is selected.

This commit is contained in:
Ulrich Czekalla 2000-12-15 22:58:25 +00:00 committed by Alexandre Julliard
parent 7d6467649f
commit 7c55bc0cd6
1 changed files with 25 additions and 25 deletions

View File

@ -1927,8 +1927,8 @@ static LRESULT LISTBOX_HandleLButtonDown( WND *wnd, LB_DESCR *descr,
: descr->lphc->self->hwndSelf ); : descr->lphc->self->hwndSelf );
} }
if (index != -1) if (index == -1) return 0;
{
if (descr->style & LBS_EXTENDEDSEL) if (descr->style & LBS_EXTENDEDSEL)
{ {
/* we should perhaps make sure that all items are deselected /* we should perhaps make sure that all items are deselected
@ -1955,11 +1955,11 @@ static LRESULT LISTBOX_HandleLButtonDown( WND *wnd, LB_DESCR *descr,
!descr->items[index].selected), !descr->items[index].selected),
(descr->style & LBS_NOTIFY) != 0 ); (descr->style & LBS_NOTIFY) != 0 );
} }
}
descr->captured = TRUE; descr->captured = TRUE;
SetCapture( wnd->hwndSelf ); SetCapture( wnd->hwndSelf );
if (index != -1 && !descr->lphc)
if (!descr->lphc)
{ {
if (descr->style & LBS_NOTIFY ) if (descr->style & LBS_NOTIFY )
SendMessageA( descr->owner, WM_LBTRACKPOINT, index, SendMessageA( descr->owner, WM_LBTRACKPOINT, index,