mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
user32: DefDlgProc on WM_QUIT should repost it and terminate the dialog message loop.
This commit is contained in:
parent
1a65e209f8
commit
bb411cfb65
2 changed files with 8 additions and 6 deletions
|
@ -805,7 +805,13 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
|
|||
/* No message present -> send ENTERIDLE and wait */
|
||||
SendMessageW( ownerMsg, WM_ENTERIDLE, MSGF_DIALOGBOX, (LPARAM)hwnd );
|
||||
}
|
||||
if (!GetMessageW( &msg, 0, 0, 0 )) break;
|
||||
GetMessageW( &msg, 0, 0, 0 );
|
||||
}
|
||||
|
||||
if (msg.message == WM_QUIT)
|
||||
{
|
||||
PostQuitMessage( msg.wParam );
|
||||
dlgInfo->flags |= DF_END;
|
||||
}
|
||||
|
||||
if (!IsWindow( hwnd )) return 0;
|
||||
|
|
|
@ -10124,19 +10124,15 @@ static void test_quit_message(void)
|
|||
flush_events();
|
||||
flush_sequence();
|
||||
ret = DialogBoxParam(GetModuleHandle(0), "TEST_EMPTY_DIALOG", 0, wm_quit_dlg_proc, 0);
|
||||
todo_wine
|
||||
ok(ret == 1, "expected 1, got %d\n", ret);
|
||||
ok_sequence(WmQuitDialogSeq, "WmQuitDialogSeq", TRUE);
|
||||
ok_sequence(WmQuitDialogSeq, "WmQuitDialogSeq", FALSE);
|
||||
memset(&msg, 0xab, sizeof(msg));
|
||||
ret = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
|
||||
todo_wine
|
||||
ok(ret, "PeekMessage failed\n");
|
||||
if (ret) {
|
||||
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
|
||||
ok(msg.wParam == 0x1234, "wParam was 0x%lx instead of 0x1234\n", msg.wParam);
|
||||
ok(msg.lParam == 0, "lParam was 0x%lx instead of 0\n", msg.lParam);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct message WmMouseHoverSeq[] = {
|
||||
{ WM_MOUSEACTIVATE, sent|optional }, /* we can get those when moving the mouse in focus-follow-mouse mode under X11 */
|
||||
|
|
Loading…
Reference in a new issue