summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-15 18:43:47 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-15 18:43:47 +0000
commit8dd7b691b09985e41eae01e47852760e59b1ee3e (patch)
tree75d9010bceb78d1bacbf34a6a2b609a17f187a11
parent0f2ef70050b891f26b9cc0317299c35381c36203 (diff)
downloadmarex-dev-8dd7b691b09985e41eae01e47852760e59b1ee3e.tar.gz
marex-dev-8dd7b691b09985e41eae01e47852760e59b1ee3e.tar.bz2
water plugin: only decrement water win wave vertex count if those waves actually are drawn
git-svn-id: file:///beryl/trunk@4087 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r--beryl-plugins/src/water.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/beryl-plugins/src/water.c b/beryl-plugins/src/water.c
index faa5f6b..b51416b 100644
--- a/beryl-plugins/src/water.c
+++ b/beryl-plugins/src/water.c
@@ -1113,7 +1113,12 @@ static void waterPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
{
WATER_SCREEN(s);
- if (ws->count)
+ Bool drawWaves = TRUE;
+
+ if (ws->current.w)
+ drawWaves = ((s->x == ws->current.vpX) && (s->y == ws->current.vpY));
+
+ if (ws->count && drawWaves)
{
ws->count -= 10;
if (ws->count < 0)