mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:17:14 +00:00
riched20: Don't emit EN_CHANGE events during window creation.
This commit is contained in:
parent
0b069106b0
commit
5c997de8dc
|
@ -8949,7 +8949,7 @@ static void test_init_messages(void)
|
|||
ok(parent != 0, "Failed to create parent window\n");
|
||||
change_received = FALSE;
|
||||
edit = new_window("RichEditWithEvents", 0, parent);
|
||||
todo_wine ok(change_received == FALSE, "Creating a RichEdit should not make any EN_CHANGE events\n");
|
||||
ok(change_received == FALSE, "Creating a RichEdit should not make any EN_CHANGE events\n");
|
||||
DestroyWindow(edit);
|
||||
DestroyWindow(parent);
|
||||
}
|
||||
|
|
|
@ -1142,6 +1142,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
|
|||
WCHAR *textW = NULL;
|
||||
LONG codepage = unicode ? CP_UNICODE : CP_ACP;
|
||||
int len;
|
||||
LRESULT evmask;
|
||||
|
||||
ITextServices_OnTxInPlaceActivate( host->text_srv, NULL );
|
||||
|
||||
|
@ -1150,7 +1151,10 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
|
|||
text = unicode ? (void *)createW->lpszName : (void *)createA->lpszName;
|
||||
textW = ME_ToUnicode( codepage, text, &len );
|
||||
}
|
||||
ITextServices_TxSendMessage( host->text_srv, EM_GETEVENTMASK, 0, 0, &evmask );
|
||||
ITextServices_TxSendMessage( host->text_srv, EM_SETEVENTMASK, 0, evmask & ~ENM_CHANGE, &evmask );
|
||||
ITextServices_TxSetText( host->text_srv, textW );
|
||||
ITextServices_TxSendMessage( host->text_srv, EM_SETEVENTMASK, 0, evmask, NULL );
|
||||
if (lparam) ME_EndToUnicode( codepage, textW );
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue