summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 04:01:48 +0000
committerxsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 04:01:48 +0000
commit239e667ffc0f8da6b41e85c7be5c66a042336f6f (patch)
tree5ebe5d6fa3e5b53827845084f7f95838cb363fff
parent858928529cbd907a218b3cbeea5d7f44bb0afca6 (diff)
downloadmarex-dev-239e667ffc0f8da6b41e85c7be5c66a042336f6f.tar.gz
marex-dev-239e667ffc0f8da6b41e85c7be5c66a042336f6f.tar.bz2
beryl-plugins-unsupported: Fixed up all unsupported plugins so that they now work with the new FIA (fragment system). All compiles.
git-svn-id: file:///beryl/trunk@4010 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r--beryl-plugins-unsupported/src/plane.c35
-rw-r--r--beryl-plugins-unsupported/src/snow.c12
-rw-r--r--beryl-plugins-unsupported/src/tile.c26
-rw-r--r--beryl-plugins-unsupported/src/zoom.c5
4 files changed, 42 insertions, 36 deletions
diff --git a/beryl-plugins-unsupported/src/plane.c b/beryl-plugins-unsupported/src/plane.c
index 353836a..241f374 100644
--- a/beryl-plugins-unsupported/src/plane.c
+++ b/beryl-plugins-unsupported/src/plane.c
@@ -230,7 +230,7 @@ static Bool end_move(void *data)
ps->timeout_handle = 0;
- focusDefaultWindow(screen->display);
+ focusDefaultWindow(screen);
return FALSE;
}
@@ -315,6 +315,7 @@ static void planePreparePaintScreen(CompScreen * s, int msSinceLastPaint)
static void
planePaintTransformedScreen(CompScreen * screen,
const ScreenPaintAttrib * sAttrib,
+ const CompTransform * transform,
Region region, int output, unsigned int mask)
{
PLANE_SCREEN(screen);
@@ -333,15 +334,14 @@ planePaintTransformedScreen(CompScreen * screen,
ScreenPaintAttrib sa = *sAttrib;
- (*screen->paintTransformedScreen) (screen, &sa, region, output, mask);
+ (*screen->paintTransformedScreen) (screen, &sa, transform, region, output, mask);
if (sa.zCamera != ps->initZoom)
{
/* If we are not moving zoom back LESS when drawing the current viewport than the others, gives a zoom of sorts to the selected viewport */
sa.zCamera = -1.5;
- (*screen->paintTransformedScreen) (screen,
- &sa, region, output, mask);
+ (*screen->paintTransformedScreen) (screen, &sa, transform, region, output, mask);
WRAP(ps, screen, paintTransformedScreen,
planePaintTransformedScreen);
@@ -407,13 +407,13 @@ planePaintTransformedScreen(CompScreen * screen,
{
glTranslatef(dx, dy, 0.0);
- (*screen->paintTransformedScreen) (screen, sAttrib, mask);
+ (*screen->paintTransformedScreen) (screen, sAttrib, transform, mask);
glTranslatef(-1.0, 0.0, 0.0);
moveScreenViewport(screen, 1, 0, FALSE);
- (*screen->paintTransformedScreen) (screen, sAttrib, mask);
+ (*screen->paintTransformedScreen) (screen, sAttrib, transform, mask);
moveScreenViewport(screen, -1, 0, FALSE);
}
@@ -421,13 +421,13 @@ planePaintTransformedScreen(CompScreen * screen,
{
glTranslatef(dx, dy, 0.0);
- (*screen->paintTransformedScreen) (screen, sAttrib, mask);
+ (*screen->paintTransformedScreen) (screen, sAttrib, transform, mask);
glTranslatef(1.0, 0.0, 0.0);
moveScreenViewport(screen, -1, 0, FALSE);
- (*screen->paintTransformedScreen) (screen, sAttrib, mask);
+ (*screen->paintTransformedScreen) (screen, sAttrib, transform, mask);
moveScreenViewport(screen, 1, 0, FALSE);
}
@@ -450,7 +450,7 @@ planePaintTransformedScreen(CompScreen * screen,
/* Provide the effect of scrolling rather than snapping */
glTranslatef(dx, -dy, 0.0);
- (*screen->paintTransformedScreen) (screen, sAttrib, region,
+ (*screen->paintTransformedScreen) (screen, sAttrib, transform, region,
output, mask);
/* Draw viewports a bit further apart if we are 'zoomed' */
float s1 = 1.05;
@@ -472,8 +472,7 @@ planePaintTransformedScreen(CompScreen * screen,
glTranslatef(s1, 0.0, 0.0);
moveScreenViewport(screen, -1, 0, FALSE);
}
- (*screen->paintTransformedScreen) (screen, sAttrib, region,
- output, mask);
+ (*screen->paintTransformedScreen) (screen, sAttrib, transform, region, output, mask);
if (dy > 0)
{
glTranslatef(0.0, s1, 0.0);
@@ -484,8 +483,7 @@ planePaintTransformedScreen(CompScreen * screen,
glTranslatef(0.0, s2, 0.0);
moveScreenViewport(screen, 0, -1, FALSE);
}
- (*screen->paintTransformedScreen) (screen, sAttrib, region,
- output, mask);
+ (*screen->paintTransformedScreen) (screen, sAttrib, region, transform, output, mask);
if (dx > 0)
{
glTranslatef(s1, 0.0, 0.0);
@@ -496,8 +494,7 @@ planePaintTransformedScreen(CompScreen * screen,
glTranslatef(s2, 0.0, 0.0);
moveScreenViewport(screen, 1, 0, FALSE);
}
- (*screen->paintTransformedScreen) (screen, sAttrib, region,
- output, mask);
+ (*screen->paintTransformedScreen) (screen, sAttrib, region, transform, output, mask);
if (dy > 0)
{
glTranslatef(0.0, s2, 0.0);
@@ -523,8 +520,7 @@ planePaintTransformedScreen(CompScreen * screen,
{
glTranslatef(i, j, 0);
moveScreenViewport(screen, -i, -j, FALSE);
- (*screen->paintTransformedScreen) (screen,
- sAttrib,
+ (*screen->paintTransformedScreen) (screen, sAttrib, transform,
region, output, mask);
glTranslatef(-i, -j, 0);
moveScreenViewport(screen, i, j, FALSE);
@@ -553,7 +549,8 @@ static void planeDonePaintScreen(CompScreen * s)
static Bool
planePaintScreen(CompScreen * s,
- const ScreenPaintAttrib * sAttrib,
+ const ScreenPaintAttrib * sAttrib,
+ const CompTransform * transform,
Region region, int output, unsigned int mask)
{
Bool status;
@@ -567,7 +564,7 @@ planePaintScreen(CompScreen * s,
}
UNWRAP(ps, s, paintScreen);
- status = (*s->paintScreen) (s, sAttrib, region, output, mask);
+ status = (*s->paintScreen) (s, sAttrib, transform, region, output, mask);
WRAP(ps, s, paintScreen, planePaintScreen);
return status;
diff --git a/beryl-plugins-unsupported/src/snow.c b/beryl-plugins-unsupported/src/snow.c
index fe2069b..ad88b63 100644
--- a/beryl-plugins-unsupported/src/snow.c
+++ b/beryl-plugins-unsupported/src/snow.c
@@ -402,8 +402,10 @@ static void beginRendering(SnowScreen * ss, CompScreen * s, int output)
}*/
static Bool
-snowPaintScreen(CompScreen * s, const ScreenPaintAttrib * sa,
- Region region, int output, unsigned int mask)
+snowPaintScreen(CompScreen * s,
+ const ScreenPaintAttrib * sa,
+ const CompTransform * transform,
+ Region region, int output, unsigned int mask)
{
Bool status;
@@ -416,7 +418,7 @@ snowPaintScreen(CompScreen * s, const ScreenPaintAttrib * sa,
}
UNWRAP(ss, s, paintScreen);
- status = (*s->paintScreen) (s, sa, region, output, mask);
+ status = (*s->paintScreen) (s, sa, transform, region, output, mask);
WRAP(ss, s, paintScreen, snowPaintScreen);
if (onTop && ss->active)
@@ -427,7 +429,7 @@ snowPaintScreen(CompScreen * s, const ScreenPaintAttrib * sa,
static Bool
snowPaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
- Region region, unsigned int mask)
+ const CompTransform * transform, Region region, unsigned int mask)
{
int status = TRUE;
@@ -435,7 +437,7 @@ snowPaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
// First draw Window as usual
UNWRAP(ss, w->screen, paintWindow);
- status = (*w->screen->paintWindow) (w, attrib, region, mask);
+ status = (*w->screen->paintWindow) (w, attrib, transform, region, mask);
WRAP(ss, w->screen, paintWindow, snowPaintWindow);
// Check whether this is the Desktop Window
diff --git a/beryl-plugins-unsupported/src/tile.c b/beryl-plugins-unsupported/src/tile.c
index 388c657..fa2cd8c 100644
--- a/beryl-plugins-unsupported/src/tile.c
+++ b/beryl-plugins-unsupported/src/tile.c
@@ -209,7 +209,8 @@ static Bool setWindowFutureSize(CompWindow *w);
int current = 0;
// window painting function, draws animation
-static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Region region, unsigned int mask)
+static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
+ const CompTransform * transform, Region region, unsigned int mask)
{
CompScreen *s = w->screen;
Bool status;
@@ -224,6 +225,8 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Re
if(tw->isResizing && td->currentAnimationType != outline) // on window texture animation
{
WindowPaintAttrib sAttrib = *attrib;
+ FragmentAttrib fragment;
+ initFragmentAttrib (&fragment, &sAttrib);
glPushMatrix();
glLoadIdentity();
@@ -236,7 +239,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Re
*/
case drop:
glRotatef(100.0f/td->animationDuration*ts->msResizing - 100, 0,0,1);
- (*s->drawWindow) (w, &sAttrib, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
break;
/*
@@ -244,7 +247,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Re
*/
case zoom:
glTranslatef(0,0, -1 + ts->msResizing/(float)td->animationDuration);
- (*s->drawWindow) (w, &sAttrib, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
break;
/*
@@ -258,7 +261,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Re
if(ts->msResizing > current*ts->oneDuration) // windows that have animation finished already
{
- (*s->drawWindow) (w, &sAttrib, 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
{
@@ -271,7 +274,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Re
else
glTranslatef(s->width - s->width * (float)thisDur/ts->oneDuration, 0, 0);
- (*s->drawWindow) (w, &sAttrib, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
}
break;
@@ -290,14 +293,14 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Re
if(ts->msResizing < 0.40f*td->animationDuration)
{
sAttrib.opacity = OPAQUE - OPAQUE*ts->msResizing/(0.40f*td->animationDuration);
- (*s->drawWindow) (w, &sAttrib, 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, &sAttrib, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
+ (*s->drawWindow) (w, transform, &fragment, region, mask | PAINT_WINDOW_TRANSFORMED_MASK);
}
break;
}
@@ -308,7 +311,7 @@ static Bool tilePaintWindow(CompWindow * w, const WindowPaintAttrib * attrib, Re
else // paint window as always
{
UNWRAP(ts, s, paintWindow);
- status = (*s->paintWindow) (w, attrib, region, mask);
+ status = (*s->paintWindow) (w, attrib, transform, region, mask);
WRAP(ts, s, paintWindow, tilePaintWindow);
}
@@ -362,7 +365,10 @@ static void tileDonePaintScreen(CompScreen * s)
WRAP(ts, s, donePaintScreen, tileDonePaintScreen);
}
-static Bool tilePaintScreen(CompScreen * s, const ScreenPaintAttrib * sa, Region region, int output, unsigned int mask)
+static Bool tilePaintScreen(CompScreen * s,
+ const ScreenPaintAttrib * sa,
+ const CompTransform * transform,
+ Region region, int output, unsigned int mask)
{
Bool status;
@@ -373,7 +379,7 @@ static Bool tilePaintScreen(CompScreen * s, const ScreenPaintAttrib * sa, Region
mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK;
UNWRAP(ts, s, paintScreen);
- status = (*s->paintScreen) (s, sa, region, output, mask);
+ status = (*s->paintScreen) (s, sa, transform, region, output, mask);
WRAP(ts, s, paintScreen, tilePaintScreen);
// Check if animation is enabled, there is resizing on screen and only outline should be drawn
diff --git a/beryl-plugins-unsupported/src/zoom.c b/beryl-plugins-unsupported/src/zoom.c
index 57f2d13..806f895 100644
--- a/beryl-plugins-unsupported/src/zoom.c
+++ b/beryl-plugins-unsupported/src/zoom.c
@@ -516,6 +516,7 @@ static void zoomDonePaintScreen(CompScreen * s)
static Bool
zoomPaintScreen(CompScreen * s,
const ScreenPaintAttrib * sAttrib,
+ const CompTransform * transform,
Region region, int output, unsigned int mask)
{
Bool status;
@@ -550,7 +551,7 @@ zoomPaintScreen(CompScreen * s,
s->filter[SCREEN_TRANS_FILTER] = COMP_TEXTURE_FILTER_FAST;
UNWRAP(zs, s, paintScreen);
- status = (*s->paintScreen) (s, &sa, region, output, mask);
+ status = (*s->paintScreen) (s, &sa, transform, region, output, mask);
WRAP(zs, s, paintScreen, zoomPaintScreen);
s->filter[SCREEN_TRANS_FILTER] = saveFilter;
@@ -558,7 +559,7 @@ zoomPaintScreen(CompScreen * s,
else
{
UNWRAP(zs, s, paintScreen);
- status = (*s->paintScreen) (s, sAttrib, region, output, mask);
+ status = (*s->paintScreen) (s, sAttrib, transform, region, output, mask);
WRAP(zs, s, paintScreen, zoomPaintScreen);
}