Commit cf659c6
committed
Fix interrupting GTK on plain Python
When the application is shut down, it's intended that all windows are
closed. This shutdown event is also run if interrupted with Ctrl-C.
But then the main loop is no longer running, and windows do not notice
the close event sent to them.
In IPython, the input hook runs the loop and allows the windows to close
down. But in plain Python, there is no input hook integration, and the
windows sit around in limbo without accepting any events.
Absent any new input hook integrations, the workaround is to iterate the
main loop on interrupt.1 parent b09aad2 commit cf659c6
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
0 commit comments