Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b1413d

Browse files
authored
Merge pull request #24625 from tacaswell/auto-backport-of-pr-24606-on-v3.6.x
Backport PR #24606: FIX: do not use deprecated API in gtk4 backend
2 parents b5f5083 + 0f88062 commit 9b1413d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/backends/backend_gtk4.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from matplotlib import _api, backend_tools, cbook
77
from matplotlib.backend_bases import (
88
FigureCanvasBase, ToolContainerBase,
9-
KeyEvent, LocationEvent, MouseEvent, ResizeEvent)
9+
KeyEvent, LocationEvent, MouseEvent, ResizeEvent,
10+
CloseEvent)
1011

1112
try:
1213
import gi
@@ -81,7 +82,7 @@ def __init__(self, figure=None):
8182
style_ctx.add_class("matplotlib-canvas")
8283

8384
def destroy(self):
84-
self.close_event()
85+
CloseEvent("close_event", self)._process()
8586

8687
def set_cursor(self, cursor):
8788
# docstring inherited

0 commit comments

Comments
 (0)