Beispiel #1
0
/* SDL addition from Ryan: free memory used by xme. */
void XiGMiscDestroy(void)
{
    if (xigmisc_info) {
        XextDestroyExtension(xigmisc_info);
        xigmisc_info = NULL;
    }
}
Beispiel #2
0
static int
_xgeDpyClose(Display* dpy, XExtCodes* codes)
{
    XExtDisplayInfo *info = _xgeFindDisplay(dpy);

    if (info->data != NULL) {
        XGEData* xge_data = (XGEData*)info->data;

        if (xge_data->extensions)
        {
            XGEExtList current, next;
            current = xge_data->extensions;
            while(current)
            {
                next = current->next;
                Xfree(current);
                current = next;
            }
        }

        XFree(xge_data->vers);
        XFree(xge_data);
    }

    if(!XextRemoveDisplay(xge_info, dpy))
        return 0;

    if (xge_info->ndisplays == 0) {
        XextDestroyExtension(xge_info);
        xge_info = NULL;
    }

    return 1;
}