8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0a04bc commit 632c41bCopy full SHA for 632c41b
lib/matplotlib/backends/_backend_gtk.py
@@ -169,6 +169,13 @@ def mainloop():
169
170
try:
171
_application.run() # Quits when all added windows close.
172
+ except KeyboardInterrupt:
173
+ # Ensure all windows can process their close event from
174
+ # _shutdown_application.
175
+ context = GLib.MainContext.default()
176
+ while context.pending():
177
+ context.iteration(True)
178
+ raise
179
finally:
180
# Running after quit is undefined, so create a new one next time.
181
_application = None
0 commit comments