GNOME Bugzilla – Bug 342356
gnome-settings-daemon draw zoom type background distorted
Last modified: 2007-04-16 18:50:54 UTC
Please describe the problem: I use ubuntu dapper. I removed nautilus. When turn gconf:///desktop/gnome/background/draw_background true, background_callback() of gnome-settings-daemon, I suppose, draw background. (Or just run gnome-background-properties) When background type is zoom, it's weird. Steps to reproduce: 1. remove nautilus from session 2. restart X window 3. run gnome-background-properties, to recall background Actual results: Zoomed background widen only. Vertical calculation breaks. Expected results: Just the same as nautilus do. Does this happen every time? Yes. Other information: I believe I have no other programs running that draw background.
Created attachment 65846 [details] zoom type background is weird
kz, do you still face this issue in gnome 2.16? do you think this is a duplicate of bug 337674? bug 339404 could also be related here.
No. This is clearly a math problem from the screenshot. The image can still be set. It is just drawn incorrectly in the case where nautilus isn't running.
Not remotely close to a showstopper; removing the gnome-target setting.
I think I'm seeing the same here early during login. Debian experimental, so e.g. gnome-control-center 2.16.3 My screen is 1440x900, my wallpapers are usually 4:3. When I login, the wallpaper is scaled as on the screenshot by kz; it looks like being scaled *1/x instead of *x. Then after a second - supposedly when nautilus is started - the image is updated again, this time correctly zoomed. And if I disable nautilus, I can also reproduce this effect. I was twisting my head around the calculations in http://svn.gnome.org/viewcvs/gnome-control-center/trunk/libbackground/applier.cbeing but they seem to be correct. They also don't differ between my gnome-control-center and nautilus (both 2.16.3)
Created attachment 86319 [details] [review] fix zoom scaling This patch seems to fix the issue for me. Can you confirm? Nautilus probably doesn't show the same behaviour because it uses libeel for drawing the background, and libeel doesn't use libbackground.
The patch didn't work for me. There are some odd things in the code, too. For example the way xfactor is calculated... isn't the if construct superfluous? I also wonder if we don't need to use xfactor/yfactor in the 'zoom' case as well. What is field vs. virtual anyway? Hmm... assuming (p = pix, v = screen) pwidth, pheight = 4, 3 virtw, virth = 16, 9 in this situation (16/4 > 9/3), we want the results zoom factor = 4.0 = virtw / pwidth swidth = 4 = pwidth sheight = 2.25 = virth / zoom = pwidth * (virth / virtw) the other situation, e.g. pwidth, pheight = 16, 9 virtw, virth = 32, 24 we want the results (since 32/16 < 24/9) zoom factor = 2.66 = virth / pheight swidth = 12 = virtw / zoom = pheight * (virtw / virth) sheight = 9
Created attachment 86438 [details] [review] Patch fixing the zoom The first hunk fixes a minor thing, the second hunk is the actual bug fix. Note that nautilus 2.16.3 did the right thing already, I don't know which code it uses.
That looks better, indeed. Thanks. 2007-04-16 Jens Granseuer <jensgr@gmx.net> Patch by: Erich Schubert <erich@debian.org> * applier.c: (get_geometry): fix scaling for WPTYPE_ZOOM. Fixes bug #342356.