http://tools.suckless.org/wmname
Java apparently keeps a list of WMs that behave in certain awkward ways, but the people at Sun have maybe never heard of Ratpoison.
One useful app this affected is jEdit.
This somewhat rambling thread contains earlier discussion on this topic (and also the topic suggested by the title):
http://www.salixos.org/forum/viewtopic.php?f=12&t=4134
Thanks again to jayseye for his help
