summaryrefslogtreecommitdiff
path: root/beryl-plugins-unsupported/src/tile.c
diff options
context:
space:
mode:
Diffstat (limited to 'beryl-plugins-unsupported/src/tile.c')
-rw-r--r--beryl-plugins-unsupported/src/tile.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/beryl-plugins-unsupported/src/tile.c b/beryl-plugins-unsupported/src/tile.c
index 964ba8c..fa2cd8c 100644
--- a/beryl-plugins-unsupported/src/tile.c
+++ b/beryl-plugins-unsupported/src/tile.c
@@ -222,18 +222,15 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
if(tw->isResizing)
mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
- CompTransform wTransform = *transform;
-
if(tw->isResizing && td->currentAnimationType != outline) // on window texture animation
{
WindowPaintAttrib sAttrib = *attrib;
FragmentAttrib fragment;
initFragmentAttrib (&fragment, &sAttrib);
- transformToScreenSpace (s, s->currentOutputDev, -DEFAULT_Z_CAMERA, &wTransform);
-
glPushMatrix();
- glLoadMatrixf(wTransform.m);
+ glLoadIdentity();
+ prepareXCoords(s, s->currentOutputDev, -DEFAULT_Z_CAMERA);
switch(td->currentAnimationType)
{
@@ -242,7 +239,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
*/
case drop:
glRotatef(100.0f/td->animationDuration*ts->msResizing - 100, 0,0,1);
- (*s->drawWindow) (w, &wTransform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
break;
/*
@@ -250,7 +247,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
*/
case zoom:
glTranslatef(0,0, -1 + ts->msResizing/(float)td->animationDuration);
- (*s->drawWindow) (w, &wTransform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
break;
/*
@@ -264,7 +261,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
if(ts->msResizing > current*ts->oneDuration) // windows that have animation finished already
{
- (*s->drawWindow) (w, &wTransform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
}
else if(ts->msResizing > (current-1)*ts->oneDuration && ts->msResizing < current*ts->oneDuration) // animation in progress
{
@@ -277,7 +274,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
else
glTranslatef(s->width - s->width * (float)thisDur/ts->oneDuration, 0, 0);
- (*s->drawWindow) (w, &wTransform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
}
break;
@@ -296,14 +293,14 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
if(ts->msResizing < 0.40f*td->animationDuration)
{
sAttrib.opacity = OPAQUE - OPAQUE*ts->msResizing/(0.40f*td->animationDuration);
- (*s->drawWindow) (w, &wTransform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
}
else if(ts->msResizing > 0.40f*td->animationDuration && !tw->resizedAlready) // resize window right after first half
setWindowFutureSize(w);
else if(ts->msResizing > 0.60f*td->animationDuration) // second half of animation, fade in
{
sAttrib.opacity = OPAQUE*(ts->msResizing - 0.60f*td->animationDuration)/(0.40f*td->animationDuration);
- (*s->drawWindow) (w, &wTransform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
}
break;
}
@@ -314,7 +311,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
else // paint window as always
{
UNWRAP(ts, s, paintWindow);
- status = (*s->paintWindow) (w, attrib, &wTransform, region, mask);
+ status = (*s->paintWindow) (w, attrib, transform, region, mask);
WRAP(ts, s, paintWindow, tilePaintWindow);
}
@@ -389,11 +386,10 @@ static Bool tilePaintScreen(CompScreen * s,
if(!td->opt[TILE_DISPLAY_OPTION_ANIMATE].value.b || !ts->isResizing || td->currentAnimationType != outline)
return status;
- CompTransform sTransform = *transform;
- transformToScreenSpace (s, output, -DEFAULT_Z_CAMERA, &sTransform);
-
glPushMatrix();
- glLoadMatrixf(sTransform.m);
+ glLoadIdentity();
+
+ prepareXCoords(s, output, -DEFAULT_Z_CAMERA);
glLineWidth(4.0f);