Alexander Larsson answered my Dear Lazyweb on finding a PID given a Window ID, to implement Richard Jones' View Source Button idea. I hacked up a tiny bash script to see what kind of info we could easily get about a window. Running that script and clicking on the Gnome calculator, I see:
$ show-source
Click on a window. Avoid clicking on a window border.
PID: 6272
Binary: /usr/bin/gcalctool
RPM: gcalctool-5.28.1-1.fc12.x86_64.rpm
SRPM: gcalctool-5.28.1-1.fc12.src.rpm
Upstream URL: http://directory.fsf.org/gcalctool.html
Fedora release: 12
Bugzilla search: https://bugzilla.redhat.com/buglist.cgi?query_format=advanced&classification=Fedora&product=Fedora&component=gcalctool&version=12
PackageDB page: https://admin.fedoraproject.org/pkgdb/packages/name/gcalctool
Transifex page: (None)
There's a lot more that needs to be handled -- for example, clicking on a script window reports the interpreter instead of the script, clicking on a window border reports nothing, clicking on the window of a consolehelper'd app fails on access to /proc/$PID/exe, and clicking on a terminal window reports the terminal program instead of the character-mode app that is running (obviously).
All of these can be solved fairly easily, and the idea looks workable! As I noted in a commend on Richard's original post, it would be cool to make this View Source applet capable of taking the user to the pkgdb page, a source code browser (I'm thinking DXR, once we get it indexing all of Fedora), a bugzilla search, the upstream web page, or the translate.fedoraproject.org page; or, if the user chose, the applet could download and install the .src.rpm.