From 16c93bcaeaeb6aa7bb5a1432de3bef0b9ecc44f3 Mon Sep 17 00:00:00 2001 From: Joshua Achorn Date: Wed, 23 Jan 2019 02:26:48 -0500 Subject: [PATCH] Fixed bug in Windows 7 where window does not close after a call to webview_exit (#229) --- webview.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webview.h b/webview.h index 9ea0c1bc4..b2a6f83d5 100644 --- a/webview.h +++ b/webview.h @@ -1653,7 +1653,12 @@ WEBVIEW_API void webview_dialog(struct webview *w, } WEBVIEW_API void webview_terminate(struct webview *w) { PostQuitMessage(0); } -WEBVIEW_API void webview_exit(struct webview *w) { OleUninitialize(); } + +WEBVIEW_API void webview_exit(struct webview *w) { + DestroyWindow(w->priv.hwnd); + OleUninitialize(); +} + WEBVIEW_API void webview_print_log(const char *s) { OutputDebugString(s); } #endif /* WEBVIEW_WINAPI */