Creating an XftDraw on the Root Window

James Fraumeni <[email protected]> Tue, 12 Nov 2002 17:15:53 -0500
Newsgroups gmane.comp.xfree86.render
Message-ID <[email protected]>
	Hello. I am trying to use XftDrawString8 to draw slightly translucent 
text on the base screen (outside of a window) and depending on where I 
call it, either nothing shows up, or else the program seg faults and 
crashes.
	I call:
		XftDrawString8(flash_draw, render_color,
				flash_font, 150, 150,
				(XftChar8 *) "M", strlen("M"));
	Where:
		flash_draw = XftDrawCreate(dpy,
                         DefaultRootWindow(dpy),
                         DefaultVisual(dpy,
                                 DefaultScreen(dpy)),
                         DefaultColormap(dpy,
                                 DefaultScreen(dpy)));
		dpy = XOpenDisplay(NULL);
		flash_font = XftFontOpenName(dpy,
			DefaultScreen(dpy), "mono-200");

	I have used the rest of this code within the same program to get 
successful font viewings within windows defined with XCreateSimpleWindow 
  with success, and I just don't know enough about the inner-workings of 
Xlib/XRender to know what I am doing wrong. I doubt anyone will be able 
to figure out my error from this information, but if anybody has sample 
code or insight into what might be wrong, it would be much appreciated.
	Thanks.
	



                                 James Fraumeni