static Bool
glibInitDisplay (CompPlugin  *p,
		 CompDisplay *d)
{
    GLibDisplay *gd;

    if (!checkPluginABI ("core", CORE_ABIVERSION))
	return FALSE;

    gd = malloc (sizeof (GLibDisplay));
    if (!gd)
	return FALSE;

    gd->fds	      = NULL;
    gd->fdsSize	      = 0;
    gd->timeoutHandle = 0;
    gd->notifyAtom    = XInternAtom (d->display, "_COMPIZ_GLIB_NOTIFY", 0);

    WRAP (gd, d, handleEvent, glibHandleEvent);

    d->base.privates[displayPrivateIndex].ptr = gd;

    glibPrepare (d, g_main_context_default ());

    return TRUE;
}
static Bool
glibDispatchAndPrepare (void *closure)
{
    CompDisplay  *display = (CompDisplay *) closure;
    GMainContext *context = g_main_context_default ();

    glibDispatch (display, context);
    glibPrepare (display, context);

    return FALSE;
}
示例#3
0
static Bool
glibDispatchAndPrepare (void *closure)
{
    CompDisplay  *display = (CompDisplay *) closure;
    GLIB_DISPLAY (display);
    GMainContext *context = g_main_context_default ();

    glibDispatch (display, context);
    glibPrepare (display, context);

    gd->wakeupTimeoutHandle = 0;

    return FALSE;
}