wgpu-py
wgpu-py copied to clipboard
Gui layer run() method does not return after closing window
Like the title says, closing a WgpuCanvas window does not cause the event loop to return, and thus run() to return. Should be pretty easy?
As far as I can tell this is the (intended) behavior. What GUI backend does not do it this way?
GLFW for example uses loop.run_forever() instead of loop.run_until_complete(...):
https://github.com/pygfx/wgpu-py/blob/e1987d044eaab480f03b08c2ed97e7f2faae8446/wgpu/gui/glfw.py#L514-L518
But there is also a loop.stop right above. Could probably be refactored to use run_until_complete and remove the stop though.
Looks like this has been fixed a while ago in #319.