tags 347858 +patch thanks On Mon, May 28, 2007 at 09:38:28AM +0200, Yves-Alexis Perez wrote: > I have just checked with a 1200x801 wallpaper. I don't have the 1px > problem at bottom edge, but I have it on the right edge, so it's > reproducible. I've forwarded the bug upstream, and will keep you > informed.
1200/801 is not exactly the same as 1280/854, so it's not clear your
behaviour is actually a bug. (Do you really have a 1280 x 854
display?)
I've attached a proposed fix. I've compiled and installed it, but
haven't yet checked it on a 1024x768 screen.
Peace,
Dylan Thurston
--- xfce-backdrop.c 2007-05-28 11:47:14.000000000 -0400
+++ xfce-backdrop.c.orig 2007-05-28 11:47:47.000000000 -0400
@@ -525,7 +525,7 @@
{
GdkPixbuf *final_image, *image = NULL, *tmp;
gint i, j;
- gint w, h, iw = 0, ih = 0, sw, sh;
+ gint w, h, iw = 0, ih = 0;
XfceBackdropImageStyle istyle;
gint dx, dy, xo, yo;
gdouble xscale, yscale;
@@ -641,22 +641,18 @@
yscale = (gdouble)h / ih;
if(xscale < yscale) {
yscale = xscale;
- sw = w;
- sh = ih * yscale;
xo = 0;
- yo = (h - sh) / 2;
+ yo = (h - (ih * yscale)) / 2;
} else {
xscale = yscale;
- sw = iw * xscale;
- sh = h;
- xo = (w - sw) / 2;
+ xo = (w - (iw * xscale)) / 2;
yo = 0;
}
dx = xo;
dy = yo;
gdk_pixbuf_composite(image, final_image, dx, dy,
- sw, sh, xo, yo, xscale, yscale,
+ iw * xscale, ih * yscale, xo, yo, xscale, yscale,
interp, 255);
break;
signature.asc
Description: Digital signature

