We have observed that the buttons attribute of the MouseEvent class is wrong under certain circumstances. Currently the MousePress and MouseRelease events are used to record which mouse buttons are pressed. But a mouse press is not always followed by a corresponding mouse release (at least when using the Qt6 backend). This goes wrong in the following scenario:
- Press LMB on the vispy canvas
- Modal dialog pops up
- Release LMB while the modal dialog is in focus
- Vispy canvas never receives the
MouseRelease event and therefore will still record LMB as being pressed.
In t-wallet@1a7b091 I fixed this for the Qt6 backend by using the buttons() function on the native Qt event, so that can be used as a reference.