Author: tfaber
Date: Tue Aug 12 15:50:27 2014
New Revision: 63875
URL:
http://svn.reactos.org/svn/reactos?rev=63875&view=rev
Log:
[WIN32K:NTUSER]
- Clear appropriate message bits when removing a sent message in FindRemoveAsyncMsg.
Thanks to Giannis.
- Fix list walk in FindRemoveAsyncMsg
CORE-7013 #resolve
Modified:
trunk/reactos/win32ss/user/ntuser/focus.c
Modified: trunk/reactos/win32ss/user/ntuser/focus.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/focus.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] Tue Aug 12 15:50:27 2014
@@ -315,28 +315,22 @@
pti = Wnd->head.pti;
- if (!IsListEmpty(&pti->SentMessagesListHead))
+ Entry = pti->SentMessagesListHead.Flink;
+ while (Entry != &pti->SentMessagesListHead)
{
// Scan sent queue messages to see if we received async messages.
- Entry = pti->SentMessagesListHead.Flink;
Message = CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry);
- do
- {
- if (IsListEmpty(Entry)) return;
- if (!Message) return;
- Entry = Message->ListEntry.Flink;
-
- if (Message->Msg.message == WM_ASYNC_SETACTIVEWINDOW &&
- Message->Msg.hwnd == UserHMGetHandle(Wnd) &&
- Message->Msg.wParam == wParam )
- {
- ERR("ASYNC SAW: Found one in the Sent Msg Queue! %p Activate/Deactivate
%d\n", Message->Msg.hwnd,!!wParam);
- RemoveEntryList(&Message->ListEntry); // Purge the entry.
- ExFreePoolWithTag(Message, TAG_USRMSG);
- }
- Message = CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry);
- }
- while (Entry != &pti->SentMessagesListHead);
+ Entry = Entry->Flink;
+
+ if (Message->Msg.message == WM_ASYNC_SETACTIVEWINDOW &&
+ Message->Msg.hwnd == UserHMGetHandle(Wnd) &&
+ Message->Msg.wParam == wParam)
+ {
+ ERR("ASYNC SAW: Found one in the Sent Msg Queue! %p Activate/Deactivate
%d\n", Message->Msg.hwnd, !!wParam);
+ RemoveEntryList(&Message->ListEntry); // Purge the entry.
+ ClearMsgBitsMask(pti, Message->QS_Flags);
+ ExFreePoolWithTag(Message, TAG_USRMSG);
+ }
}
}