rem: if (!bPtr->flags.selected) doclick = 1; bPtr->flags.pushed = 1;
context: handleActionEvents(XEvent *event, void *data){    Button *bPtr = (Button*)data;    int doclick = 0, dopaint=0;    CHECK_CLASS(data, WC_Button);    if (!bPtr->flags.enabled)	return;        switch (event->type) {     case EnterNotify:	if (bPtr->groupIndex == 0) {	    bPtr->flags.pushed = bPtr->flags.wasPushed;	    if (bPtr->flags.pushed) {		bPtr->flags.selected = !bPtr->flags.prevSelected;		dopaint = 1;	    }	}	break;     case LeaveNotify:	if (bPtr->groupIndex == 0) {	    bPtr->flags.wasPushed = bPtr->flags.pushed;	    if (bPtr->flags.pushed) {		bPtr->flags.selected = bPtr->flags.prevSelected;		dopaint = 1;	    }	    bPtr->flags.pushed = 0;	}	break;     case ButtonPress:	if (event->xbutton.button == Button1) {	    if (bPtr->groupIndex>0) {		if (!bPtr->flags.selected)		    doclick = 1;		bPtr->flags.pushed = 1;		bPtr->flags.selected = 1;		dopaint = 1;		break;	    }	    bPtr->flags.wasPushed = 0;	    bPtr->flags.pushed = 1;	    bPtr->flags.prevSelected = bPtr->flags.selected;	    bPtr->flags.selected = !bPtr->flags.selected;	    dopaint = 1;	    	    if (bPtr->flags.continuous && !bPtr->timer) {		bPtr->timer = WMAddTimerHandler((int)(bPtr->periodicDelay*1000),						autoRepeat, bPtr);	    }	}	break;      case ButtonRelease:	if (event->xbutton.button == Button1) {	    if (bPtr->flags.pushed) {		if (bPtr->groupIndex==0)		    doclick = 1;		dopaint = 1;		if (bPtr->flags.springLoaded) {		    bPtr->flags.selected = bPtr->flags.prevSelected;		}	    }	    bPtr->flags.pushed = 0;	}	if (bPtr->timer) {	    WMDeleteTimerHandler(bPtr->timer);	    bPtr->timer = NULL;	}	break;	    }    if (dopaint)	paintButton(bPtr);        if (doclick) {	if (bPtr->flags.selected && bPtr->groupIndex>0) {	    WMPostNotificationName(WMPushedRadioNotification, bPtr, NULL);	}		if (bPtr->action)	    (*bPtr->action)(bPtr, bPtr->clientData);    }}