summaryrefslogtreecommitdiff
path: root/pugl/pugl_win.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-01 22:26:22 -0400
committerDavid Robillard <d@drobilla.net>2016-09-01 22:26:22 -0400
commit02d2704a0be7443907f5752c00b71feb58cc11dd (patch)
treef2d22fd08c10b2ff1f7762d0dc8feb3561aafa5d /pugl/pugl_win.cpp
parent252421757e4e8ca9f482f2885ef9c09492c06757 (diff)
Add PUGL_CLOSE event
This allows purely event-driven applications to handle window close. Something more extensible for WM message seems like it might be a good idea here, but I can't think of specific uses, so this will do.
Diffstat (limited to 'pugl/pugl_win.cpp')
-rw-r--r--pugl/pugl_win.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp
index c061f25..eb87197 100644
--- a/pugl/pugl_win.cpp
+++ b/pugl/pugl_win.cpp
@@ -574,10 +574,7 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_QUIT:
case PUGL_LOCAL_CLOSE_MSG:
- if (view->closeFunc) {
- view->closeFunc(view);
- view->redisplay = false;
- }
+ event.close.type = PUGL_CLOSE;
break;
default:
return DefWindowProc(