Пример #1
0
bool
ResizeScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
			     const GLMatrix            &transform,
			     const CompRegion          &region,
			     CompOutput                *output,
			     unsigned int              mask)
{
    bool status;

    if (logic.w)
    {
	if (logic.mode == ResizeOptions::ModeStretch)
	    mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK;
    }

    status = gScreen->glPaintOutput (sAttrib, transform, region, output, mask);

    if (status && logic.w)
    {
	unsigned short *border, *fill;

	border = optionGetBorderColor ();
	fill   = optionGetFillColor ();

	switch (logic.mode) {
	    case ResizeOptions::ModeOutline:
		glPaintRectangle (sAttrib, transform, output, border, NULL);
		break;
	    case ResizeOptions::ModeRectangle:
		glPaintRectangle (sAttrib, transform, output, border, fill);
	    default:
		break;
	}
    }

    return status;
}
Пример #2
0
static Bool
gridPaintOutput (CompScreen		 *s,
                 const ScreenPaintAttrib *sAttrib,
                 const CompTransform	 *transform,
                 Region			 region,
                 CompOutput		 *output,
                 unsigned int		 mask)
{
    Bool status;

    GRID_SCREEN (s);

    UNWRAP (gs, s, paintOutput);
    status = (*s->paintOutput) (s, sAttrib, transform, region, output, mask);
    WRAP (gs, s, paintOutput, gridPaintOutput);

    if (gs->animating && gridGetDrawIndicator (s->display))
    {
        glPaintRectangle (s, sAttrib, transform, output);
        damagePaintRegion (s);
    }

    return status;
}