[comp.windows.x] paint in V11

jkh@violet.berkeley.edu (Jordan K. Hubbard) (07/24/87)

Has anyone ever gotten this to work? On the VAX and the Sun, there seems to
be a call to XDrawImageString() with bogus contents. On the Sun, it crashes
here, on the Vax it gets to XFlushGCCache() before croaking..

					Jordan

dana@faline.bellcore.com (Dana A. Chee) (07/27/87)

In article <> jkh@violet.berkeley.edu (Jordan K. Hubbard) writes:
>Has anyone ever gotten this to work? On the VAX and the Sun, there seems to
>be a call to XDrawImageString() with bogus contents. On the Sun, it crashes
>here, on the Vax it gets to XFlushGCCache() before croaking..
>
>					Jordan

Yes, the magical incantation is to change 
	XDrawImageString(window, gc, 0, 0, str, strlen(str));
to
	XDrawImageString(dpy, window, gc, 0, 0, str, strlen(str));

and to change
	c = GetCharFromCode(code);
to
	char buf[9];
	
	code = XLookupString(event, buf, 10, NULL, NULL);
	if( code == 1 )
		c = buf[0];
	else
		c = NULL;


Good luck;

			Dana Chee
			Room 2Q-250
			445 South Street
			Morristown, NJ  07960-1961
			(201) 829-4488
			{allegra | decvax}!bellcore!faline!dana
			dana@thumper.bellcore.com