Changeset 2371 for trunk/src/user32/oslibmsg.cpp
- Timestamp:
- Jan 8, 2000, 3:15:38 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsg.cpp
r2314 r2371 1 /* $Id: oslibmsg.cpp,v 1.2 1 2000-01-03 22:53:16 sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.22 2000-01-08 14:15:06 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 151 151 APIRET rc; 152 152 153 rc = WinPostQueueMsg(NULLHANDLE, WM_QUIT, (MPARAM)nExitCode, 0);153 rc = WinPostQueueMsg(NULLHANDLE, WM_QUIT, MPFROMLONG(nExitCode), 0); 154 154 dprintf(("WinPostQueueMsg %d returned %d", nExitCode, rc)); 155 155 } … … 174 174 memcpy(&os2msg, MsgThreadPtr, sizeof(QMSG)); 175 175 MsgThreadPtr->time = -1; 176 if( msg->hwnd) {176 if(os2msg.hwnd || os2msg.msg == WM_QUIT) { 177 177 thdb->nrOfMsgs = 1; 178 178 thdb->msgstate++; //odd -> next call to our PM window handler should dispatch the translated msg 179 179 memcpy(&thdb->msg, msg, sizeof(MSG)); 180 } 181 return (LONG)WinDispatchMsg(thdb->hab, &os2msg); 180 return (LONG)WinDispatchMsg(thdb->hab, &os2msg); 181 } 182 //SvL: Don't dispatch messages sent by PostThreadMessage (correct??) 183 return 0; 184 182 185 } 183 186 else {//is this allowed? … … 225 228 while(rc == FALSE); 226 229 227 return rc;230 return (pMsg->message == WINWM_QUIT); 228 231 } 229 232 else … … 236 239 } while (eaten); 237 240 } 238 if(rc) { 239 OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode, MSG_REMOVE); 240 memcpy(MsgThreadPtr, &os2msg, sizeof(QMSG)); 241 } 241 OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode, MSG_REMOVE); 242 memcpy(MsgThreadPtr, &os2msg, sizeof(QMSG)); 242 243 return rc; 243 244 } … … 410 411 411 412 return yyrc; 412 } 413 } 413 414 //****************************************************************************** 414 415 BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode)
Note:
See TracChangeset
for help on using the changeset viewer.