Show More
@@ -175,13 +175,6 b' def inputhook_wxphoenix(context):' | |||||
175 | # Wx uses milliseconds |
|
175 | # Wx uses milliseconds | |
176 | poll_interval = 100 |
|
176 | poll_interval = 100 | |
177 |
|
177 | |||
178 | # We have to create a dummy wx.Frame, otherwise wx.App.MainLoop will know |
|
|||
179 | # that it has nothing to do, and will return immediately. |
|
|||
180 | frame = getattr(inputhook_wxphoenix, '_frame', None) |
|
|||
181 | if frame is None: |
|
|||
182 | inputhook_wxphoenix._frame = frame = wx.Frame(None) |
|
|||
183 | frame.Show(False) |
|
|||
184 |
|
||||
185 | # Use a wx.Timer to periodically check whether input is ready - as soon as |
|
178 | # Use a wx.Timer to periodically check whether input is ready - as soon as | |
186 | # it is, we exit the main loop |
|
179 | # it is, we exit the main loop | |
187 | def poll(ev): |
|
180 | def poll(ev): | |
@@ -198,6 +191,9 b' def inputhook_wxphoenix(context):' | |||||
198 | if not callable(signal.getsignal(signal.SIGINT)): |
|
191 | if not callable(signal.getsignal(signal.SIGINT)): | |
199 | signal.signal(signal.SIGINT, signal.default_int_handler) |
|
192 | signal.signal(signal.SIGINT, signal.default_int_handler) | |
200 |
|
193 | |||
|
194 | # The SetExitOnFrameDelete call allows us to run the wx mainloop without | |||
|
195 | # having a frame open. | |||
|
196 | app.SetExitOnFrameDelete(False) | |||
201 | app.MainLoop() |
|
197 | app.MainLoop() | |
202 |
|
198 | |||
203 |
|
199 |
General Comments 0
You need to be logged in to leave comments.
Login now