change datatype to TYPE_WINTODEL before throwing away messages

This commit is contained in:
Vincent Wei
2020-03-10 15:29:55 +08:00
parent 5df58bdcbe
commit 76ca7b53dd
+4 -4
View File
@@ -3984,11 +3984,11 @@ BOOL GUIAPI DestroyVirtualWindow (HWND hVirtWnd)
/* kill all timers of this window */
KillTimer (hVirtWnd, 0);
ThrowAwayMessages (hVirtWnd);
/* make the window to be invalid for PeekMessageEx, PostMessage etc */
pVirtWin->DataType = TYPE_WINTODEL;
ThrowAwayMessages (hVirtWnd);
/* since 5.0.0: destroy local data map */
if (pVirtWin->mapLocalData) {
__mg_map_destroy (pVirtWin->mapLocalData);
@@ -4535,11 +4535,11 @@ BOOL GUIAPI DestroyMainWindow (HWND hWnd)
sg_repeat_msg.hwnd = 0;
#endif /* deprecated code */
ThrowAwayMessages (hWnd);
/* make the window to be invalid for PeekMessageEx, PostMessage etc */
pWin->DataType = TYPE_WINTODEL;
ThrowAwayMessages (hWnd);
/* houhh 20081127, move these code to desktop.c .*/
#if 0
if ((pWin->dwExStyle & WS_EX_AUTOSECONDARYDC) && pWin->secondaryDC) {