mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
EnumTaskWindows16: Basing the selection on a window's task is not only
more straightforward than comparing message queues, it also works better for Win32 applications.
This commit is contained in:
parent
29f54417b7
commit
a47bc3abb9
1 changed files with 2 additions and 3 deletions
|
@ -2198,10 +2198,9 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func,
|
|||
LPARAM lParam )
|
||||
{
|
||||
WND **list, **ppWnd;
|
||||
HQUEUE16 hQueue = GetTaskQueue( hTask );
|
||||
|
||||
/* This function is the same as EnumWindows(), */
|
||||
/* except for an added check on the window queue. */
|
||||
/* except for an added check on the window's task. */
|
||||
|
||||
if (!(list = WIN_BuildWinArray( pWndDesktop, 0, NULL ))) return FALSE;
|
||||
|
||||
|
@ -2211,7 +2210,7 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func,
|
|||
{
|
||||
/* Make sure that the window still exists */
|
||||
if (!IsWindow32((*ppWnd)->hwndSelf)) continue;
|
||||
if ((*ppWnd)->hmemTaskQ != hQueue) continue; /* Check the queue */
|
||||
if (QUEUE_GetQueueTask((*ppWnd)->hmemTaskQ) != hTask) continue;
|
||||
if (!func( (*ppWnd)->hwndSelf, lParam )) break;
|
||||
}
|
||||
HeapFree( SystemHeap, 0, list );
|
||||
|
|
Loading…
Reference in a new issue