aboutsummaryrefslogtreecommitdiffstats
path: root/src/win.c
diff options
context:
space:
mode:
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,