From 93bbcf1646e427be610273ae977a349705dcf39c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 17 Mar 2013 11:20:14 +0000 Subject: two forgotten DestroyWindow() git-svn-id: http://svn.miranda-ng.org/main/trunk@4071 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/main.cpp | 10 ++++++++-- plugins/Popup/src/popup_thread.cpp | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index c614c702f1..350f99f536 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1021,8 +1021,7 @@ int ProtoAck(WPARAM wParam,LPARAM lParam) //The protocol changed from a disconnected status to a connected status. //Enable the popups for this protocol. int idTimer = AddAtomA(szProto); - if (idTimer) - { + if (idTimer) { char TimerProtoName[256]; mir_snprintf(TimerProtoName, sizeof(TimerProtoName), "ConnectionTimeout%s", szProto); UINT ConnectTimer = db_get_dw(0, MODULE, TimerProtoName, db_get_dw(0, MODULE, "ConnectionTimeout", 10000)); @@ -1132,6 +1131,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) return 0; } +static int OnShutdown(WPARAM, LPARAM) +{ + DestroyWindow(SecretWnd); + return 0; +} + extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfoEx); @@ -1141,6 +1146,7 @@ extern "C" int __declspec(dllexport) Load(void) //We create this Hook which will notify everyone when a contact changes his status. hHookContactStatusChanged = CreateHookableEvent(ME_STATUSCHANGE_CONTACTSTATUSCHANGED); HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); + HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown); //We add the option page and the user info page (it's needed because options are loaded after plugins) HookEvent(ME_OPT_INITIALISE, OptionsInitialize); //This is needed for "NoSound"-like routines. diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp index 5c7ecfb9d0..cbba209c62 100644 --- a/plugins/Popup/src/popup_thread.cpp +++ b/plugins/Popup/src/popup_thread.cpp @@ -339,5 +339,6 @@ static void __cdecl PopupThread(void *arg) DispatchMessage(&msg); } - ReleaseMutex(hThreadMutex); + DestroyWindow(gHwndManager); gHwndManager = NULL; + ReleaseMutex(hThreadMutex); hThreadMutex = NULL; } -- cgit v1.2.3