From 8548ca6f8d84b0a1f59c23bad8fb341b9e5338a1 Mon Sep 17 00:00:00 2001 From: Kjell Le Date: Sun, 19 Nov 2017 03:47:35 +0100 Subject: [PATCH] figure_enter_event uses now LocationEvent instead of Event. This is now consistent with the documentation: https://matplotlib.org/users/event_handling.html --- lib/matplotlib/backend_bases.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 97af9477e74e..204dff041da4 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -2017,8 +2017,11 @@ def enter_notify_event(self, guiEvent=None, xy=None): if xy is not None: x, y = xy self._lastx, self._lasty = x, y + else: + x = None + y = None - event = Event('figure_enter_event', self, guiEvent) + event = LocationEvent('figure_enter_event,', self, x, y, guiEvent) self.callbacks.process('figure_enter_event', event) @cbook.deprecated("2.1")