/*
** Generated by X-Designer
*/

/*
** X-Designer-generated prelude.
** Do not edit lines before "End of X-Designer generated prelude"
** Lines beginning ** X-Designer Stub indicate a stub
** which will not be output on re-generation
*/

/*
**LIBS: -lXm -lXt -lX11
*/

#include <stdlib.h>
#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>

#include <Xm/Xm.h>

#include "popups12.h"



/* End of X-Designer generated prelude */

/* Event Handler Stub Functions */

/*
** X-Designer Stub ButtonPressHandler
*/

#ifndef   _NO_PROTO
void ButtonPressHandler(Widget w, XtPointer client_data, XEvent *event, Boolean *continue_to_dispatch)
#else  /* _NO_PROTO */
void ButtonPressHandler(w, client_data, event, continue_to_dispatch)
	Widget    w ;
	XtPointer client_data ;
	XEvent   *event ;
	Boolean  *continue_to_dispatch ;
#endif /* _NO_PROTO */
{
	XButtonPressedEvent *be = (XButtonPressedEvent *) event ;
	Widget               menu;

	if (be->type != ButtonPress) {
		return ;
	}

	if (be->button != Button3) {
		return ;
	}

	if (((be->x + be->y) % 2) == 0) {
		menu = menuA ;
	}
	else {
		menu = menuB ;
	}

	XmMenuPosition (menu, be) ;
	XtManageChild (menu) ;
}


