From a47bc3abb9589b3c120b78a25e5b55a741e1ba55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85ngstr=C3=B6m?= Date: Sat, 14 Nov 1998 17:00:37 +0000 Subject: [PATCH] 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. --- windows/win.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/windows/win.c b/windows/win.c index e9aa5007f24..25933c79589 100644 --- a/windows/win.c +++ b/windows/win.c @@ -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 );