Mercurial > dwindows
changeset 190:f4c9fa77136a
A cleaner way of finding the toplevel window.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 10 Jan 2003 19:19:56 +0000 |
parents | 230686a7eba9 |
children | 634625c3239d |
files | os2/dw.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Sun Jan 05 06:26:26 2003 +0000 +++ b/os2/dw.c Fri Jan 10 19:19:56 2003 +0000 @@ -45,7 +45,7 @@ HWND hwndBubble = NULLHANDLE, hwndBubbleLast = NULLHANDLE, hwndEmph = NULLHANDLE; PRECORDCORE pCore = NULL, pCoreEmph = NULL; ULONG aulBuffer[4]; -HWND lasthcnr = 0, lastitem = 0, popup = 0; +HWND lasthcnr = 0, lastitem = 0, popup = 0, desktop; #define IS_WARP4() (aulBuffer[0] == 20 && aulBuffer[1] >= 40) @@ -166,7 +166,7 @@ HWND box, lastbox = WinQueryWindow(handle, QW_PARENT); /* Find the toplevel window */ - while((box = WinQueryWindow(lastbox, QW_PARENT)) > 0x80000001 && box > 0) + while((box = WinQueryWindow(lastbox, QW_PARENT)) != desktop && box > 0) { lastbox = box; } @@ -2999,6 +2999,8 @@ /* Get the OS/2 version. */ DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_MS_COUNT,(void *)aulBuffer, 4*sizeof(ULONG)); + desktop = WinQueryDesktopWindow(dwhab, NULLHANDLE); + return rc; }