- Timestamp:
- Aug 5, 2002, 11:45:49 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/windowmsg.cpp
r8956 r8960 1 /* $Id: windowmsg.cpp,v 1.3 7 2002-08-01 16:10:51sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.38 2002-08-05 09:45:49 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 884 884 } 885 885 if(dwMilliseconds == 0) { //case 2 886 //TODO: what has a higher priority; message presence or signalled object? 886 if(nCount) { 887 ret = WaitForMultipleObjects(nCount, pHandles, fWaitAll, dwMilliseconds); 888 if(ret < WAIT_OBJECT_0 + nCount) { 889 return ret; 890 } 891 } 887 892 if(GetQueueStatus(dwWakeMask) == 0) { 888 if(nCount) {889 return WaitForMultipleObjects(nCount, pHandles, fWaitAll, dwMilliseconds);890 }891 893 return WAIT_TIMEOUT; 892 894 } … … 934 936 return WAIT_ABANDONED; 935 937 } 938 //check if any object is already signalled 939 ret = WaitForMultipleObjects(nCount, pHandles, fWaitAll, 0); 940 if(ret < WAIT_OBJECT_0 + nCount) { 941 return ret; 942 } 936 943 //if the msg queue already contains the messages defined by dwWakeMask, 937 944 //then return immediately … … 947 954 memcpy(pHandlesTmp, pHandles, nCount*sizeof(HANDLE)); 948 955 pHandlesTmp[nCount] = teb->o.odin.hPostMsgEvent; 956 957 //mark this thread as waiting for window messages 949 958 teb->o.odin.dwWakeMask = dwWakeMask; 950 959 951 960 ResetEvent(teb->o.odin.hPostMsgEvent); 952 961 ret = HMMsgWaitForMultipleObjects(nCount+1,pHandlesTmp,fWaitAll,dwMilliseconds,dwWakeMask); 962 963 //unmark thread 964 teb->o.odin.dwWakeMask = 0; 965 953 966 //nCount + 2 -> message event -> return nCount + 1 954 teb->o.odin.dwWakeMask = 0;955 967 return (ret == nCount + 2) ? (nCount + 1) : ret; 956 968 }
Note:
See TracChangeset
for help on using the changeset viewer.