In xserver 1.4 (and head of server-1.4-branch too), switching away to a text VT and back generates 5 spurious ButtonRelese Events for each of the 5 mouse buttons, This can be verified by running xev while doing a VT switch.
*** This bug has been marked as a duplicate of bug 13144 ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.