Thanks to visit codestin.com Credit goes to github.com
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 7a4a366 + 632c41b commit d536b8eCopy full SHA for d536b8e
1 file changed
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