summaryrefslogtreecommitdiff
path: root/beryl-plugins-unsupported/src/snow.c
diff options
context:
space:
mode:
Diffstat (limited to 'beryl-plugins-unsupported/src/snow.c')
-rw-r--r--beryl-plugins-unsupported/src/snow.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/beryl-plugins-unsupported/src/snow.c b/beryl-plugins-unsupported/src/snow.c
index ad88b63..5a7d515 100644
--- a/beryl-plugins-unsupported/src/snow.c
+++ b/beryl-plugins-unsupported/src/snow.c
@@ -158,7 +158,8 @@ typedef struct _SnowFlake
static void InitiateSnowFlake(SnowScreen * ss, SnowFlake * sf);
static void setSnowflakeTexture(SnowScreen * ss, SnowFlake * sf);
-static void beginRendering(SnowScreen * ss, CompScreen * s, int output);
+static void beginRendering(SnowScreen * ss, CompScreen * s,
+ CompTransform * transform, int output);
static void setupDisplayList(SnowScreen * ss);
static void snowThink(SnowScreen * ss, SnowFlake * sf);
@@ -306,17 +307,17 @@ static void setupDisplayList(SnowScreen * ss)
}
-static void beginRendering(SnowScreen * ss, CompScreen * s, int output)
+static void beginRendering(SnowScreen * ss, CompScreen * s,
+ CompTransform * transform, int output)
{
- glPushMatrix();
- glLoadIdentity();
+ CompTransform sTransform = *transform;
+ transformToScreenSpace (s, output, -DEFAULT_Z_CAMERA, &sTransform);
- prepareXCoords(s, output, -DEFAULT_Z_CAMERA);
+ glPushMatrix();
+ glLoadMatrixf (sTransform.m);
if (useBlending)
- {
glEnable(GL_BLEND);
- }
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@@ -422,7 +423,7 @@ snowPaintScreen(CompScreen * s,
WRAP(ss, s, paintScreen, snowPaintScreen);
if (onTop && ss->active)
- beginRendering(ss, s, output);
+ beginRendering(ss, s, transform, output);
return status;
}
@@ -443,7 +444,7 @@ snowPaintWindow(CompWindow * w, const WindowPaintAttrib * attrib,
// Check whether this is the Desktop Window
if (w->type & CompWindowTypeDesktopMask && ss->active && !onTop)
{
- beginRendering(ss, w->screen, outputDeviceForWindow(w));
+ beginRendering(ss, w->screen, transform, outputDeviceForWindow(w));
}
return status;
}