Commit bcd8dc93 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent 956c296a
...@@ -2018,11 +2018,14 @@ ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM* wParam, LPARAM* lParam) ...@@ -2018,11 +2018,14 @@ ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM* wParam, LPARAM* lParam)
{ {
MSGFILTER msgf; 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.nmhdr.code = EN_MSGFILTER;
msgf.msg = msg; msgf.msg = msg;
msgf.wParam = *wParam; msgf.wParam = *wParam;
msgf.lParam = *lParam; 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; return FALSE;
*wParam = msgf.wParam; *wParam = msgf.wParam;
*lParam = msgf.lParam; *lParam = msgf.lParam;
......
...@@ -452,8 +452,6 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, ...@@ -452,8 +452,6 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface,
HWND parent = GetParent(hwnd); HWND parent = GetParent(hwnd);
UINT id = GetWindowLongW(hwnd, GWLP_ID); UINT id = GetWindowLongW(hwnd, GWLP_ID);
/* Note: EN_MSGFILTER is documented as not being sent to TxNotify */
switch (iNotify) switch (iNotify)
{ {
case EN_DROPFILES: case EN_DROPFILES:
...@@ -492,6 +490,9 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, ...@@ -492,6 +490,9 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface,
SendMessageW(parent, WM_COMMAND, MAKEWPARAM(id, iNotify), (LPARAM)hwnd); SendMessageW(parent, WM_COMMAND, MAKEWPARAM(id, iNotify), (LPARAM)hwnd);
break; break;
case EN_MSGFILTER:
FIXME("EN_MSGFILTER is documented as not being sent to TxNotify\n");
/* fall through */
default: default:
return E_FAIL; return E_FAIL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment