Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

event handlers have different signatures across backends #8715

Copy link
Copy link
Closed
@anntzer

Description

@anntzer
Issue body actions

FigureCanvas.motion_notify_event and other event handlers have different signatures across backends:

lib/matplotlib/backend_bases.py
1893:    def motion_notify_event(self, x, y, guiEvent=None):

lib/matplotlib/backends/backend_gtk.py
321:    def motion_notify_event(self, widget, event):

lib/matplotlib/backends/backend_tkagg.py
386:    def motion_notify_event(self, event):

lib/matplotlib/backends/backend_gtk3.py
263:    def motion_notify_event(self, widget, event):

Note that the default signature is written in such a way that one can programmatically trigger an event on the canvas without having to instantiate a native event object, which may be tricky (yes, you could always mock the event but that's obviously not optimal). It would be preferrable if all backends kept the same signature (which would probably involve breaking backcompat).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.