mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +00:00
[Win32k]
- Fix all the wine Win test_SetForegroundWindow and todo tests. svn path=/trunk/; revision=56608
This commit is contained in:
parent
ec7cfde16c
commit
e86a655d72
2 changed files with 39 additions and 3 deletions
|
@ -229,6 +229,38 @@ IntFindChildWindowToOwner(PWND Root, PWND Owner)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
FindRemoveAsyncMsg(PWND Wnd)
|
||||
{
|
||||
PUSER_MESSAGE_QUEUE MessageQueue;
|
||||
PUSER_SENT_MESSAGE Message;
|
||||
PLIST_ENTRY Entry;
|
||||
|
||||
if (!Wnd) return;
|
||||
|
||||
MessageQueue = Wnd->head.pti->MessageQueue;
|
||||
|
||||
if (!IsListEmpty(&MessageQueue->SentMessagesListHead))
|
||||
{
|
||||
// Scan sent queue messages to see if we received async messages.
|
||||
Entry = MessageQueue->SentMessagesListHead.Flink;
|
||||
Message = CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry);
|
||||
do
|
||||
{
|
||||
if (Message->Msg.message == WM_ASYNC_SETACTIVEWINDOW &&
|
||||
Message->Msg.hwnd == UserHMGetHandle(Wnd) &&
|
||||
Message->Msg.wParam == 0 )
|
||||
{
|
||||
TRACE("ASYNC SAW: Found one in the Sent Msg Queue! %p\n", Message->Msg.hwnd);
|
||||
RemoveEntryList(Entry); // Purge the entry.
|
||||
}
|
||||
Entry = Message->ListEntry.Flink;
|
||||
Message = CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry);
|
||||
}
|
||||
while (Entry != &MessageQueue->SentMessagesListHead);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Can the system force foreground from one or more conditions.
|
||||
*/
|
||||
|
@ -307,15 +339,17 @@ co_IntSetForegroundAndFocusWindow(PWND Wnd, BOOL MouseActivate)
|
|||
{
|
||||
IntSetFocusMessageQueue(Wnd->head.pti->MessageQueue);
|
||||
gptiForeground = Wnd->head.pti;
|
||||
fgRet = TRUE;
|
||||
}
|
||||
/*
|
||||
Fix FG Bounce with regedit but breaks test_SFW todos:
|
||||
Henri Verbeet,
|
||||
What happens is that we get the WM_WINE_SETACTIVEWINDOW message sent by the
|
||||
other thread after we already changed the foreground window back to our own
|
||||
window.
|
||||
*/
|
||||
FindRemoveAsyncMsg(Wnd); // Do this to fix test_SFW todos!
|
||||
fgRet = TRUE;
|
||||
}
|
||||
|
||||
// Fix FG Bounce with regedit.
|
||||
if (hWndPrev != hWnd )
|
||||
{
|
||||
if (PrevForegroundQueue &&
|
||||
|
|
|
@ -569,7 +569,9 @@ NtUserCallHwndLock(
|
|||
break;
|
||||
|
||||
case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW:
|
||||
TRACE("co_IntSetForegroundWindow 1 %p\n",hWnd);
|
||||
Ret = co_IntSetForegroundWindow(Window);
|
||||
TRACE("co_IntSetForegroundWindow 2 \n");
|
||||
break;
|
||||
|
||||
case HWNDLOCK_ROUTINE_UPDATEWINDOW:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue