##// END OF EJS Templates
RF: Use SetExitOnFrameDelete instead of creating a frame
Paul McCarthy -
Show More
@@ -175,13 +175,6 b' def inputhook_wxphoenix(context):'
175 175 # Wx uses milliseconds
176 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 178 # Use a wx.Timer to periodically check whether input is ready - as soon as
186 179 # it is, we exit the main loop
187 180 def poll(ev):
@@ -198,6 +191,9 b' def inputhook_wxphoenix(context):'
198 191 if not callable(signal.getsignal(signal.SIGINT)):
199 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 197 app.MainLoop()
202 198
203 199
General Comments 0
You need to be logged in to leave comments. Login now