diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 009e96b0e9..3caa33806f 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -128,11 +128,11 @@ HANDLE SendMessageDirect(const TCHAR *szMsg, HANDLE hContact, char *szProto) dbei.timestamp = (DWORD)time(NULL);
dbei.cbBlob = (DWORD)bufSize;
dbei.pBlob = (PBYTE)sendBuffer;
- HANDLE hNewEvent = db_event_add(hContact, &dbei);
- MessageWindowEvent evt = { sizeof(evt), sendId, hContact, hNewEvent };
+ MessageWindowEvent evt = { sizeof(evt), sendId, hContact, &dbei };
NotifyEventHooks(hHookWinWrite, 0, (LPARAM)&evt);
+ HANDLE hNewEvent = db_event_add(hContact, &dbei);
msgQueue_add(hContact, sendId, szMsg, hNewEvent);
mir_free(sendBuffer);
return hNewEvent;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 969e049017..97de54f461 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -409,7 +409,7 @@ int LoadSendRecvMessageModule(void) hHookWinEvt = CreateHookableEvent(ME_MSG_WINDOWEVENT);
hHookWinPopup = CreateHookableEvent(ME_MSG_WINDOWPOPUP);
- hHookWinWrite = CreateHookableEvent(ME_MSG_WRITEEVENT);
+ hHookWinWrite = CreateHookableEvent(ME_MSG_PRECREATEEVENT);
SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (Focused Window)"));
SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (Unfocused Window)"));
|