diff options
author | David Robillard <d@drobilla.net> | 2023-01-07 19:27:08 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-07 20:27:35 -0500 |
commit | 677e13dcbb5b64ce85093b9ea5c14025964e35b9 (patch) | |
tree | 9a96cf4188cdd709093d2c5fe987bcf253d12540 /src/win.c | |
parent | ba11bb80c96fc9c9124ba2fa929425f558f86824 (diff) | |
download | pugl-677e13dcbb5b64ce85093b9ea5c14025964e35b9.tar.gz pugl-677e13dcbb5b64ce85093b9ea5c14025964e35b9.tar.bz2 pugl-677e13dcbb5b64ce85093b9ea5c14025964e35b9.zip |
Support closing views by sending a close event
Diffstat (limited to 'src/win.c')
-rw-r--r-- | src/win.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -887,6 +887,11 @@ puglStopTimer(PuglView* view, uintptr_t id) PuglStatus puglSendEvent(PuglView* view, const PuglEvent* event) { + if (event->type == PUGL_CLOSE) { + PostMessage(view->impl->hwnd, WM_CLOSE, 0, 0); + return PUGL_SUCCESS; + } + if (event->type == PUGL_CLIENT) { PostMessage(view->impl->hwnd, PUGL_LOCAL_CLIENT_MSG, |