Skip to content

Commit 0aac9f1

Browse files
authored
Merge pull request #24606 from tacaswell/fix_gtk_closevent
FIX: do not use deprecated API in gtk4 backend
2 parents 8a7a53a + 4e7dd10 commit 0aac9f1

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
@@ -5,7 +5,8 @@
55
import matplotlib as mpl
66
from matplotlib import _api, backend_tools, cbook
77
from matplotlib.backend_bases import (
8-
ToolContainerBase, KeyEvent, LocationEvent, MouseEvent, ResizeEvent)
8+
ToolContainerBase, KeyEvent, LocationEvent, MouseEvent, ResizeEvent,
9+
CloseEvent)
910

1011
try:
1112
import gi
@@ -79,7 +80,7 @@ def __init__(self, figure=None):
7980
style_ctx.add_class("matplotlib-canvas")
8081

8182
def destroy(self):
82-
self.close_event()
83+
CloseEvent("close_event", self)._process()
8384

8485
def set_cursor(self, cursor):
8586
# docstring inherited

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy