Module: wine Branch: master Commit: bcd8dc93a2c5052a1185fe1b462fc0d95a5adb59 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bcd8dc93a2c5052a1185fe1b46...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Thu Mar 5 17:06:47 2009 -0500
richedit: Avoid calling ITextHost_TxNotify with EN_MSGFILTER.
The documentation for TxNotify says that it is not called with the EN_MSGFILTER notification, so I made sure ME_FilterEvent didn't call this method.
---
dlls/riched20/editor.c | 5 ++++- dlls/riched20/txthost.c | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 09feb96..93d0c34 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2018,11 +2018,14 @@ ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM* wParam, LPARAM* lParam) { MSGFILTER msgf;
+ if (!editor->hWnd) return FALSE; + msgf.nmhdr.hwndFrom = editor->hWnd; + msgf.nmhdr.idFrom = GetWindowLongW(editor->hWnd, GWLP_ID); msgf.nmhdr.code = EN_MSGFILTER; msgf.msg = msg; msgf.wParam = *wParam; msgf.lParam = *lParam; - if (ITextHost_TxNotify(editor->texthost, msgf.nmhdr.code, &msgf) == S_OK) + if (SendMessageW(GetParent(editor->hWnd), WM_NOTIFY, msgf.nmhdr.idFrom, (LPARAM)&msgf)) return FALSE; *wParam = msgf.wParam; *lParam = msgf.lParam; diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 5032e87..8fabd83 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -452,8 +452,6 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, HWND parent = GetParent(hwnd); UINT id = GetWindowLongW(hwnd, GWLP_ID);
- /* Note: EN_MSGFILTER is documented as not being sent to TxNotify */ - switch (iNotify) { case EN_DROPFILES: @@ -492,6 +490,9 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, SendMessageW(parent, WM_COMMAND, MAKEWPARAM(id, iNotify), (LPARAM)hwnd); break;
+ case EN_MSGFILTER: + FIXME("EN_MSGFILTER is documented as not being sent to TxNotify\n"); + /* fall through */ default: return E_FAIL; }