static Bool
titleinfoInitWindow (CompPlugin *p,
		     CompWindow *w)
{
    TitleinfoWindow *tw;

    TITLEINFO_SCREEN (w->screen);

    tw = malloc (sizeof (TitleinfoWindow));
    if (!tw)
	return FALSE;

    tw->remoteMachine = NULL;
    tw->title         = NULL;
    tw->owner         = -1;

    w->base.privates[ts->windowPrivateIndex].ptr = tw;

    titleinfoUpdateTitle (w);
    titleinfoUpdateMachine (w);
    titleinfoUpdatePid (w);
    titleinfoUpdateVisibleName (w);

    return TRUE;
}
Пример #2
0
static void titleinfoFiniScreen(CompPlugin * p, CompScreen * s)
{
	TITLEINFO_SCREEN(s);

	UNWRAP(ts, s, addSupportedAtoms);

	freeWindowPrivateIndex(s, ts->windowPrivateIndex);

	free(ts);
}
Пример #3
0
static unsigned int
titleinfoAddSupportedAtoms(CompScreen * s, Atom * atoms, unsigned int size)
{
	unsigned int count;

	TITLEINFO_DISPLAY(s->display);
	TITLEINFO_SCREEN(s);

	UNWRAP(ts, s, addSupportedAtoms);
	count = (*s->addSupportedAtoms) (s, atoms, size);
	WRAP(ts, s, addSupportedAtoms, titleinfoAddSupportedAtoms);

	if ((size - count) >= 2) {
		atoms[count++] = td->visibleNameAtom;
		atoms[count++] = td->wmPidAtom;
	}

	return count;
}