matplotlib/matplotlib — pull request #893 by hmeine (2012-05-23 16:19:57+00:00)
Title: let Qt4 backend ignore extra mouse buttons (fixes exceptions)

My mouse has more than three buttons, so I noticed by accident that the current qt4 backend does not cope with mouse events on the canvas for these buttons (but throws exceptions). Apart from fixing the exception, I introduced the use of Qt constants for readability, and added the two missing constants for the extra buttons in case someone wants to pick this up later and introduce support for these buttons.

This was discussed in pull request #890 and now rebased onto the v1.1.x branch as requested. (Note that during the rebase, the fix of the double-click handler got removed, because that one’s not present in 1.1.x yet.)