After installing a new emacs-snapshot package, suddenly Emacs started crashing when I iconified a window and moved the mouse over it.
The output in the terminal said something about an X Error, BadMatch and 42, which a quick search turned up was X_SetInputFocus().
(I even tried shooting of a message to the fvwm mailing list, but it is probably awaiting moderator approval, as I didn't think to subscribe first.)
So I turned to the Emacs source code and tried discarding those error events there instead.
This lead to a trivial follow up patch that "solves" the problem by making Emacs discard BadMatch errors from X_SetInputFocus directly.
I don't think it is the right solution, but hopefully someone will pick up the thing and say what is.
Update: Nobody has responded, so I have proceeded to build packages from Julien Danjou's packages with my trivial patch applied - available in my local .deb repository.