From 02d2704a0be7443907f5752c00b71feb58cc11dd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 1 Sep 2016 22:26:22 -0400 Subject: 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. --- pugl/pugl_win.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pugl/pugl_win.cpp') 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( -- cgit v1.2.1