From 451c98173d83ee1618d7923890e803dd7067de40 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 29 Jul 2013 16:41:17 +0000 Subject: resource clearance moved to ME_SYSTEM_PRESHUTDOWN instead of ME_SYSTEM_OKTOEXIT git-svn-id: http://svn.miranda-ng.org/main/trunk@5527 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'plugins/StatusPlugins/AdvancedAutoAway') diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index 1bd878db57..a6de74e205 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -71,10 +71,6 @@ static BOOL ignoreAltCombo = FALSE; static BOOL monitorMouse = TRUE; static BOOL monitorKeyboard = TRUE; static HWND confirmDialog; -static HANDLE hAutoAwayOptionsHook; -static HANDLE hAutoAwayShutDownHook; -static HANDLE hProtoAckHook; -static HANDLE hAccChangeHook; static int mouseStationaryTimer; HHOOK hMirandaMouseHook = NULL; HHOOK hMirandaKeyBoardHook = NULL; @@ -578,10 +574,6 @@ static int AutoAwayShutdown(WPARAM wParam,LPARAM lParam) #ifdef TRIGGERPLUGIN DeInitTrigger(); #endif - UnhookEvent(hAutoAwayOptionsHook); - UnhookEvent(hAutoAwayShutDownHook); - UnhookEvent(hAccChangeHook); - UnhookEvent(hProtoAckHook); UnhookWindowsHooks(); DestroyHookableEvent(hStateChangedEvent); @@ -600,10 +592,10 @@ int CSModuleLoaded(WPARAM wParam, LPARAM lParam) else MyGetLastInputInfo = NULL; - hAccChangeHook = HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged); - hAutoAwayOptionsHook = HookEvent(ME_OPT_INITIALISE,AutoAwayOptInitialise); - hAutoAwayShutDownHook = HookEvent(ME_SYSTEM_OKTOEXIT,AutoAwayShutdown); - hProtoAckHook = HookEvent(ME_PROTO_ACK, ProcessProtoAck); + HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged); + HookEvent(ME_OPT_INITIALISE, AutoAwayOptInitialise); + HookEvent(ME_SYSTEM_PRESHUTDOWN, AutoAwayShutdown); + HookEvent(ME_PROTO_ACK, ProcessProtoAck); mouseStationaryTimer = 0; lastInput = lastMirandaInput = GetTickCount(); -- cgit v1.2.3