/* ==== open_xwindow.c =======================================================
 *
 *      Created : 89/07/30 CAP
 *      Editted : 91/10/12 CAP
 *
 *      91/10/12 CAP
 *      After a year hiatus we look at this code.
 */
#include "pxwidgets.h"

xwindow *init_xwindow()
{
    xwindow *root;
    char *display_name;

    display_name = NULL;

    if (root = (xwindow *)malloc(sizeof(xwindow))) {
        root->display	= XOpenDisplay (display_name);
        root->screen	= DefaultScreen (root->display);
        root->window	= DefaultRootWindow (root->display);
        root->cmap		= DefaultColormap (root->display, root->screen);

		root->colors = NULL;
    }
	
    return(root);
}
