aboutsummaryrefslogtreecommitdiffstats
path: root/src/win.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-07 19:27:08 -0500
committerDavid Robillard <d@drobilla.net>2023-01-07 20:27:35 -0500
commit677e13dcbb5b64ce85093b9ea5c14025964e35b9 (patch)
tree9a96cf4188cdd709093d2c5fe987bcf253d12540 /src/win.c
parentba11bb80c96fc9c9124ba2fa929425f558f86824 (diff)
downloadpugl-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/win.c b/src/win.c
index 73f0757..79d38c2 100644
--- a/src/win.c
+++ b/src/win.c
@@ -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,