All pastes #731902 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-10 14:20 UTC
rendered paste body
diff --git a/wallpaper.c b/wallpaper.c
index b585692..ef4ca5b 100644
--- a/wallpaper.c
+++ b/wallpaper.c
@@ -538,9 +538,18 @@ wallpaperPaintBackground (CompScreen *s,
     GLfloat *d, *data;
     CompTexture * bg;
     WallpaperWallpaper * ww;
-
-
-    ww = getTextureForViewport(s, s->x, s->y);
+    int vx,vy;
+
+    vx = s->x + (s->windowOffsetX / s->width);
+    while (vx < 0) vx += s->hsize;
+    vx %= s->hsize;
+
+    vy = s->y + (s->windowOffsetY / s->height);
+    while (vy < 0) vy += s->vsize;
+    vy %= s->vsize;
+
+
+    ww = getTextureForViewport(s, vx, vy);
     bg = &ww->texture;

     if (!nBox)