rem: WMSelectListItem(lPtr, tmp);
context: handleActionEvents(XEvent *event, void *data){    List *lPtr = (List*)data;    int tmp;    int topItem = lPtr->topItem;    CHECK_CLASS(data, WC_List);    switch (event->type) {     case ButtonRelease:	lPtr->flags.buttonPressed = 0;	tmp = getItemIndexAt(lPtr, event->xbutton.y);	if (tmp == lPtr->selectedItem && tmp >= 0) {	    if (lPtr->action)		(*lPtr->action)(lPtr, lPtr->clientData);	}	break;     case EnterNotify:	lPtr->flags.buttonPressed = lPtr->flags.buttonWasPressed;	lPtr->flags.buttonWasPressed = 0;	break;     case LeaveNotify:	lPtr->flags.buttonWasPressed = lPtr->flags.buttonPressed;	lPtr->flags.buttonPressed = 0;	break;     case ButtonPress:	if (event->xbutton.x > WMWidgetWidth(lPtr->vScroller)) {	    tmp = getItemIndexAt(lPtr, event->xbutton.y);	    lPtr->flags.buttonPressed = 1;	    if (tmp >= 0) {		WMSelectListItem(lPtr, tmp);		if (tmp == lPtr->selectedItem && WMIsDoubleClick(event)) {		    if (lPtr->doubleAction)			(*lPtr->doubleAction)(lPtr, lPtr->doubleClientData);		}		lPtr->selectedItem = tmp;	    }	}	break;	     case MotionNotify:	if (lPtr->flags.buttonPressed) {	    tmp = getItemIndexAt(lPtr, event->xmotion.y);	    if (tmp>=0 && tmp != lPtr->selectedItem) {		WMSelectListItem(lPtr, tmp);		lPtr->selectedItem = tmp;	    }	}	break;    }    if (lPtr->topItem != topItem)    	WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);}