Skip to content

Commit d3804c2

Browse files
committed
Fix Ctrl+C out of IPython on GTK4.
The `Gtk.Window.destroy` doesn't work, but `.close` correctly triggers our cleanup.
1 parent 7b63dee commit d3804c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/_backend_gtk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _shutdown_application(app):
2828
# The application might prematurely shut down if Ctrl-C'd out of IPython,
2929
# so close all windows.
3030
for win in app.get_windows():
31-
win.destroy()
31+
win.close()
3232
# The PyGObject wrapper incorrectly thinks that None is not allowed, or we
3333
# would call this:
3434
# Gio.Application.set_default(None)

0 commit comments

Comments
 (0)