Description of problem: xclock window is too small with certain X resources. Version-Release number of selected component (if applicable): xorg-x11-apps-7.3-1.fc8 How reproducible: always Steps to Reproduce: 1. xrdb --load <<EOF XClock*analog: false XClock*padding: 3 XClock*font: fixed XClock*geometry: -0-0 EOF 2. xclock Actual results: xclock is cut off on the bottom and right. This is to a great enough extent that the time does not fully display. See window dump in xclock.png, attached Expected results: I would have expected something more like the image xclock2.png, which is approximately what I would have seen in Fedora 7 and which is basically what I see on every other version of Linux I've used for the past 15 years. The xclock2.png image was captured from my Debian 4.0 system. (I actually ran xclock from there displayed on my Fedora 8 desktop, thus ruling out all possible causes except the clock program itself and any resource files included with it.)
Created attachment 265141 [details] Fedora 8 xclock image
Created attachment 265151 [details] expected xclock image; taken from a Debian system Note that I can see this, albeit with slight font differences, if I resize the xclock window from my Fedora 8 system.
For what it's worth, the debian and Fedora XClock and XClock-color app-defaults files are identical. Yes, some people actually do still run xclock, shocking as that may be.
Created attachment 265941 [details] reproduction with Rawhide Yes, I can reproduce this with Rawhide.
I have what I believe is a correct patch. I can't be 100% certain because I can't test this with multiple languages, but looking at a diff between a working version of xclock and the current version, I was able to narrow the arrow down to a specific line of code. Looking at the logic, it seems that they just botched the scope of an else block. I just added a pair of braces. I get correct behavior now with LANG=C, no LANG, and LANG=en_US.UTF-8, so I believe this is probably correct now, or at least closer than it was. I hope you will consider inclusion of this patch. Inline, I'm including a diff -uw so you can see how small the change is. I'm attaching a patch that includes reindenting the changed code. --- Clock.c.orig 2007-09-14 17:18:56.000000000 -0400 +++ Clock.c 2008-05-10 22:18:46.147733977 -0400 @@ -656,6 +656,7 @@ 2 * w->clock.padding; } else + { #endif #ifndef NO_I18N if (!no_locale) { @@ -698,6 +699,7 @@ w->clock.font->descent + 2 * w->clock.padding; } } + } if (w->core.width == 0) w->core.width = min_width; if (w->core.height == 0) The patch is relative to the xclock directory.
Created attachment 305049 [details] proper patch
For what it's worth, I've also included this patch in debian bug 443227, http://bugs.debian.org/443227.
See also https://bugs.freedesktop.org/show_bug.cgi?id=15903
Turns out this problem was already fixed upstream. xclock in the x.org git repository is correct and has the missing set of braces applied as well as another fix in the same block of code.
Should I close this with "UPSTREAM"?
This message is a reminder that Fedora 8 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 8. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '8'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 8's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 8 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I don't know what the status of this is in Fedora or RedHat, but I know it's been fixed upstream a long time ago, so I'm going to close it.