Closed
Description
Bug summary
The GTK4 backend does not set the guiEvent attribute on GUI events.
Code for reproduction
from pylab import *; mpl.use("gtk4agg")
gcf().canvas.mpl_connect("button_press_event", lambda e: print(e.guiEvent))
show()
# and click anywhere
Actual outcome
None
Expected outcome
<GdkButtonEvent at 0x...>
Additional information
Probably the fix is simply to pass guiEvent=controller.get_current_event()
to each of the event callbacks in backend_gtk4.py
Operating system
macOS, but should be irrelevant
Matplotlib Version
3.10.0.dev786+g60458da93e
Matplotlib Backend
gtk4agg
Python version
3.12
Jupyter version
no
Installation
git checkout