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.
2 parents b528d5c + cf659c6 commit 98f005cCopy full SHA for 98f005c
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