I can't easily reproduce the problem since I don't use X. Perhaps the problem is due to cleanup changes in src/unexaix.c. To test this hypothesis, can you please try the attached file in place of the 24.3.91 src/unexaix.c? The attached file is as close to 24.3's unexaix.c as possible; the files can't be identical due to other changes in Emacs. Thanks.