Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
Description
If a program calls PostMessage with WM_QUIT as parameter, the target window doesn't exit the message loop.
Although this isn't the right way to destroy a window, it works in windows.
This is what msdn says: "Do not post the WM_QUIT message using the PostMessage function; use PostQuitMessage."
However "user32_winetest.exe msg" tests this behaviour and proves that it works in windows and not in reactos. When I run user32_winetest.exe msg, it creates a new thread that creates a new window. The first thread does some other tests with the window in the new thread and in the end in order to kill the new thread it calls PostMessage:
ret = PostMessageA(wnd_event.hwnd, WM_QUIT, 0, 0);
and then wait it to terminate:
ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
this creates a deadlock in the winetest and it hangs there.