Subject: help on xmenu port to X11R6
To: None <netbsd-help@NetBSD.ORG>
From: None <cp1!ganza!spath@cs.umd.edu>
List: netbsd-help
Date: 06/16/1995 06:27:01
[ sorry about the delay on this; it got bounced by majordomo as an
  'administrative request' (due to 'help' in the subject, i guess),
  and catching up on majordomo mail took back seat to catching up on
  other things when i returned from my travels... -- cgd ]

I grabbed xmenu.tar.Z from ftp.x.org and have tried to get
it running; it's a pop-up menu callable from shell scripts.
The only bug relates to the menu heading.  By changing the
code I was able to get it compiled, but the heading does
not appear.  Could someone let me know the correct calling
set-up for XrmGetResource?

Thanks!

snip from xmenu.c as edited follows:
- ------------------------------------
/*** definition added: ***/
XrmDatabase db;

main(argc, argv)
int argc;
char *argv[];
{
	Widget shell, button;
	Cardinal i;
	Position x, y;
	int int_x, int_y;
	Window junk1;
	int junk2;
	unsigned int junk3;
	Display *dpy;
	struct ret *output_values;
	String name, heading;
	char *blank;
	XrmValue value;
	Boolean used_callback = FALSE;

	x = y = 400; /* just in case XQueryPointer() fails 8-) */

	XtToolkitInitialize();
	dpy = XtOpenDisplay(XtCreateApplicationContext(), NULL,
					"xmenu", "XMenu",
					options, XtNumber(options),
					&argc, argv);

	if (XQueryPointer(dpy, DefaultRootWindow(dpy), &junk1, &junk1,
	    &int_x, &int_y, &junk2, &junk2, &junk3)) {
		x = int_x;
		y = int_y;
	}

/*** if (XrmGetResource(dpy->db, "xmenu.heading", "", &blank, &value)) ***/
	if (XrmGetResource(db, "xmenu.heading", "", &blank, &value))
		heading = (char *)value.addr;
	else
		heading = NULL;

- ------------
end of snip

- -- 
/jes ! recycled cookie:
Long life is in store for you.


------- End of Forwarded Message