I found out that the problem was that I installed the Nortel remote sslvpn application manager that makes some changes to the system. Once I undid those changes all X programs started to work fine again. It is interesting what kind of changes to the system can interfere with cygwin programs in this way.