From 1c31c1c2818d712ae04be676ab4b909396b487df Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Fri, 5 Aug 2022 15:31:24 +0300 Subject: [PATCH] Weather: Free widget from a single place --- ExplorerPatcher/dllmain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 9864492..c43e4a5 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -867,6 +867,7 @@ DWORD EP_ServiceWindowThread(DWORD unused) EnterCriticalSection(&lock_epw); if (epw) { + epw->lpVtbl->Release(epw); epw = NULL; prev_total_h = 0; if (PeopleButton_LastHWND) InvalidateRect(PeopleButton_LastHWND, NULL, TRUE); @@ -4432,11 +4433,10 @@ SIZE WINAPI PeopleButton_CalculateMinimumSizeHook(void* _this, SIZE* pSz) } if (bFailed) { - epw->lpVtbl->Release(epw); - epw = NULL; prev_total_h = 0; PostMessageW(FindWindowW(L"Shell_TrayWnd", NULL), WM_COMMAND, 435, 0); - PostMessageW(FindWindowW(L"ExplorerPatcher_GUI_" _T(EP_CLSID), NULL), WM_USER + 1, 0, 0); + //PostMessageW(FindWindowW(L"ExplorerPatcher_GUI_" _T(EP_CLSID), NULL), WM_USER + 1, 0, 0); + if (hServiceWindowThread) PostThreadMessageW(GetThreadId(hServiceWindowThread), WM_USER + 1, NULL, NULL); break; } }