Пример #1
0
static Bool
scaleaddonCloseWindow(CompDisplay * d,
		      CompAction * action,
		      CompActionState state, CompOption * option, int nOption)
{
	CompScreen *s;
	Window xid;

	xid = getIntOptionNamed(option, nOption, "root", 0);

	s = findScreenAtDisplay(d, xid);
	if (s) {
		CompWindow *w;

		SCALE_SCREEN(s);
		ADDON_DISPLAY(d);

		if (!ss->grabIndex)
			return FALSE;

		w = findWindowAtDisplay(d, ad->highlightedWindow);
		if (w) {
			closeWindow(w, getCurrentTimeFromDisplay(d));
			return TRUE;
		}
	}

	return FALSE;
}
Пример #2
0
/*
 * groupCloseWindows
 *
 */
Bool
groupCloseWindows (Window xid)
{
	CompWindow *w;

	w   = findWindowAtDisplay (xid);
	if (w)
	{
		GROUP_WINDOW (w);

		if (gw->group)
		{
			int i;

			for (i = 0; i < gw->group->nWins; i++)
				closeWindow (gw->group->windows[i],
				             getCurrentTimeFromDisplay ());
		}
	}

	return FALSE;
}