diff options
author | xsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3> | 2007-02-14 08:04:53 +0000 |
---|---|---|
committer | xsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3> | 2007-02-14 08:04:53 +0000 |
commit | 74645bf176d214f411f1a4af01cb158117af7a10 (patch) | |
tree | fb90598511d493e3cddf85f1e9576a281cc7f61f | |
parent | 86923c30c40225e1405a86ab85d5ff6b5c2cadf7 (diff) | |
download | marex-dev-74645bf176d214f411f1a4af01cb158117af7a10.tar.gz marex-dev-74645bf176d214f411f1a4af01cb158117af7a10.tar.bz2 |
beryl-plugins-unsupported: Reverted tile.c for maniac
git-svn-id: file:///beryl/trunk@4047 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r-- | beryl-plugins-unsupported/src/tile.c | 28 |
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); |