summaryrefslogtreecommitdiff
path: root/plugins/Mir_core/modules.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-30 18:22:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-30 18:22:58 +0000
commitca7197e8812b188a99fc72b524f936e06e08327a (patch)
tree2f213b16b57f387282611a4653bd2f139b1154f2 /plugins/Mir_core/modules.cpp
parent7d1ec34709876918614f21f70cbe35f2667175c4 (diff)
fix for the default hook handlers
git-svn-id: http://svn.miranda-ng.org/main/trunk@703 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Mir_core/modules.cpp')
-rw-r--r--plugins/Mir_core/modules.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/Mir_core/modules.cpp b/plugins/Mir_core/modules.cpp
index 121ed1282b..61e7344676 100644
--- a/plugins/Mir_core/modules.cpp
+++ b/plugins/Mir_core/modules.cpp
@@ -213,12 +213,14 @@ MIR_CORE_DLL(int) CallHookSubscribers(HANDLE hEvent, WPARAM wParam, LPARAM lPara
case 5: returnVal = SendMessage(s->hwnd, s->message, wParam, lParam); break;
default: continue;
}
- if (returnVal)
- break;
+ if (returnVal) {
+ LeaveCriticalSection(&p->csHook);
+ return returnVal;
+ }
}
- // check for no hooks and call the default hook if any
- if (p->subscriberCount == 0 && p->pfnHook != 0)
+ // call the default hook if any
+ if (p->pfnHook != 0)
returnVal = p->pfnHook(wParam, lParam);
LeaveCriticalSection(&p->csHook);