rem: if (!bPtr->flags.pullsDown && !bPtr->menuView->flags.mapped) { if (event->xbutton.button==WINGsConfiguration.mouseWheelDown) { wheelScrollDown(bPtr); } else if (event->xbutton.button==WINGsConfiguration.mouseWheelUp) {
add: if (event->xbutton.button==WINGsConfiguration.mouseWheelUp) { if (!bPtr->menuView->flags.mapped && !bPtr->flags.pullsDown) {
context: handleActionEvents(XEvent *event, void *data){    PopUpButton *bPtr = (PopUpButton*)data;    int oldItem;    int scrHeight = WMWidgetScreen(bPtr)->rootView->size.height;    CHECK_CLASS(data, WC_PopUpButton);    if (WMGetBagItemCount(bPtr->items) < 1)	return;        switch (event->type) {	/* called for menuView */     case Expose:	paintMenuEntry(bPtr, bPtr->highlightedItem, True);	break;     case LeaveNotify:	bPtr->flags.insideMenu = 0;	if (bPtr->menuView->flags.mapped)	    paintMenuEntry(bPtr, bPtr->highlightedItem, False);	bPtr->highlightedItem = -1;	break;	     case EnterNotify:	bPtr->flags.insideMenu = 1;	break;     case MotionNotify:	if (bPtr->flags.insideMenu) {	    oldItem = bPtr->highlightedItem;	    bPtr->highlightedItem = event->xmotion.y / bPtr->view->size.height;	    if (oldItem!=bPtr->highlightedItem) {		WMMenuItem *item;				paintMenuEntry(bPtr, oldItem, False);                if (bPtr->highlightedItem >= 0 &&                    bPtr->highlightedItem < WMGetBagItemCount(bPtr->items)) {                    item = WMGetPopUpButtonMenuItem(bPtr, bPtr->highlightedItem);                    paintMenuEntry(bPtr, bPtr->highlightedItem,                                   WMGetMenuItemEnabled(item));                } else {                    bPtr->highlightedItem = -1;                }	    }	    if (event->xmotion.y_root >= scrHeight-1		|| event->xmotion.y_root <= 1) {		bPtr->scrollStartY = event->xmotion.y_root;		if (!bPtr->timer)		    autoScroll(bPtr);	    } else if (bPtr->timer) {		WMDeleteTimerHandler(bPtr->timer);		bPtr->timer = NULL;	    }	}	break;		/* called for bPtr->view */     case ButtonPress:	if (!bPtr->flags.enabled)	    break;        if (!bPtr->flags.pullsDown && !bPtr->menuView->flags.mapped) {	    if (event->xbutton.button==WINGsConfiguration.mouseWheelDown) {                wheelScrollDown(bPtr);            } else if (event->xbutton.button==WINGsConfiguration.mouseWheelUp) {                wheelScrollUp(bPtr);            }	    break;	}	popUpMenu(bPtr);	if (!bPtr->flags.pullsDown) {	    bPtr->highlightedItem = bPtr->selectedItemIndex;	    bPtr->flags.insideMenu = 1;	} else {	    bPtr->highlightedItem = -1;	    bPtr->flags.insideMenu = 0;	}	XGrabPointer(bPtr->view->screen->display, bPtr->menuView->window,		     False, ButtonReleaseMask|ButtonMotionMask|EnterWindowMask		     |LeaveWindowMask, GrabModeAsync, GrabModeAsync, 		     None, None, CurrentTime);	break;      case ButtonRelease:	if (event->xbutton.button==WINGsConfiguration.mouseWheelUp ||            event->xbutton.button==WINGsConfiguration.mouseWheelDown) {            break;        }	XUngrabPointer(bPtr->view->screen->display, event->xbutton.time);	if (!bPtr->flags.pullsDown)	    popDownMenu(bPtr);	if (bPtr->timer) {	    WMDeleteTimerHandler(bPtr->timer);	    bPtr->timer = NULL;	}	if (bPtr->flags.insideMenu && bPtr->highlightedItem>=0) {		    WMMenuItem *item;	    item = WMGetPopUpButtonMenuItem(bPtr, bPtr->highlightedItem);            if (WMGetMenuItemEnabled(item)) {		int i;                WMSetPopUpButtonSelectedItem(bPtr, bPtr->highlightedItem);		if (bPtr->flags.pullsDown) {		    for (i=0; i<MENU_BLINK_COUNT; i++) {			paintMenuEntry(bPtr, bPtr->highlightedItem, False);			XSync(bPtr->view->screen->display, 0);			wusleep(MENU_BLINK_DELAY);			paintMenuEntry(bPtr, bPtr->highlightedItem, True);			XSync(bPtr->view->screen->display, 0);			wusleep(MENU_BLINK_DELAY);		    }		}		paintMenuEntry(bPtr, bPtr->highlightedItem, False);		popDownMenu(bPtr);                if (bPtr->action)                    (*bPtr->action)(bPtr, bPtr->clientData);            }	}	if (bPtr->menuView->flags.mapped)	    popDownMenu(bPtr);	break;    }    }