From 65d312f6015e9f01219fffdd376033eb5c4d5fce Mon Sep 17 00:00:00 2001 From: Justin Bull Date: Sun, 22 Jan 2023 15:43:14 -0500 Subject: [PATCH] WM_DESTROY callback must return 0 fixes #112 --- win10toast/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win10toast/__init__.py b/win10toast/__init__.py index 8ed1bc5..ff583c4 100644 --- a/win10toast/__init__.py +++ b/win10toast/__init__.py @@ -143,6 +143,8 @@ def notification_active(self): def on_destroy(self, hwnd, msg, wparam, lparam): """Clean after notification ended. + + See https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-destroy#return-value :hwnd: :msg: @@ -153,5 +155,5 @@ def on_destroy(self, hwnd, msg, wparam, lparam): Shell_NotifyIcon(NIM_DELETE, nid) PostQuitMessage(0) - return None + return 0