riched20: Remove accesses to the editor in TxNotify.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8e17457fca
commit
6c781a1fb7
|
@ -467,12 +467,11 @@ DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxNotify,12)
|
||||||
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxNotify( ITextHost2 *iface, DWORD iNotify, void *pv )
|
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxNotify( ITextHost2 *iface, DWORD iNotify, void *pv )
|
||||||
{
|
{
|
||||||
struct host *host = impl_from_ITextHost( iface );
|
struct host *host = impl_from_ITextHost( iface );
|
||||||
HWND hwnd = host->window;
|
|
||||||
UINT id;
|
UINT id;
|
||||||
|
|
||||||
if (!host->editor || !host->editor->hwndParent) return S_OK;
|
if (!host->parent) return S_OK;
|
||||||
|
|
||||||
id = GetWindowLongW(hwnd, GWLP_ID);
|
id = GetWindowLongW( host->window, GWLP_ID );
|
||||||
|
|
||||||
switch (iNotify)
|
switch (iNotify)
|
||||||
{
|
{
|
||||||
|
@ -490,16 +489,16 @@ DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxNotify( ITextHost2 *iface, DW
|
||||||
if (!info)
|
if (!info)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
info->hwndFrom = hwnd;
|
info->hwndFrom = host->window;
|
||||||
info->idFrom = id;
|
info->idFrom = id;
|
||||||
info->code = iNotify;
|
info->code = iNotify;
|
||||||
SendMessageW( host->editor->hwndParent, WM_NOTIFY, id, (LPARAM)info );
|
SendMessageW( host->parent, WM_NOTIFY, id, (LPARAM)info );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EN_UPDATE:
|
case EN_UPDATE:
|
||||||
/* Only sent when the window is visible. */
|
/* Only sent when the window is visible. */
|
||||||
if (!IsWindowVisible(hwnd))
|
if (!IsWindowVisible( host->window ))
|
||||||
break;
|
break;
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
case EN_CHANGE:
|
case EN_CHANGE:
|
||||||
|
@ -509,7 +508,7 @@ DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxNotify( ITextHost2 *iface, DW
|
||||||
case EN_MAXTEXT:
|
case EN_MAXTEXT:
|
||||||
case EN_SETFOCUS:
|
case EN_SETFOCUS:
|
||||||
case EN_VSCROLL:
|
case EN_VSCROLL:
|
||||||
SendMessageW( host->editor->hwndParent, WM_COMMAND, MAKEWPARAM( id, iNotify ), (LPARAM)hwnd );
|
SendMessageW( host->parent, WM_COMMAND, MAKEWPARAM( id, iNotify ), (LPARAM)host->window );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EN_MSGFILTER:
|
case EN_MSGFILTER:
|
||||||
|
|
Loading…
Reference in New Issue