Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Backport PR #24606: FIX: do not use deprecated API in gtk4 backend
Merge pull request #24606 from tacaswell/fix_gtk_closevent

FIX: do not use deprecated API in gtk4 backend
(cherry picked from commit 0aac9f1)
  • Loading branch information
oscargus authored and tacaswell committed Dec 4, 2022
commit 0f8806274cfffd05fdd1892ce2e600faf3fcfb6c
5 changes: 3 additions & 2 deletions lib/matplotlib/backends/backend_gtk4.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from matplotlib import _api, backend_tools, cbook
from matplotlib.backend_bases import (
FigureCanvasBase, ToolContainerBase,
KeyEvent, LocationEvent, MouseEvent, ResizeEvent)
KeyEvent, LocationEvent, MouseEvent, ResizeEvent,
CloseEvent)

try:
import gi
Expand Down Expand Up @@ -81,7 +82,7 @@ def __init__(self, figure=None):
style_ctx.add_class("matplotlib-canvas")

def destroy(self):
self.close_event()
CloseEvent("close_event", self)._process()

def set_cursor(self, cursor):
# docstring inherited
Expand Down