Ignore:
Timestamp:
Jan 8, 2000, 6:08:56 PM (26 years ago)
Author:
sandervl
Message:

message translation fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/oslibmsg.cpp

    r2335 r2379  
    1 /* $Id: oslibmsg.cpp,v 1.9 2000-01-05 21:25:03 cbratschi Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.10 2000-01-08 17:08:55 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    151151 APIRET rc;
    152152
    153   rc = WinPostQueueMsg(NULLHANDLE, WM_QUIT, (MPARAM)nExitCode, 0);
     153  rc = WinPostQueueMsg(NULLHANDLE, WM_QUIT, MPFROMLONG(nExitCode), 0);
    154154  dprintf(("WinPostQueueMsg %d returned %d", nExitCode, rc));
    155155}
     
    179179            memcpy(&thdb->msg, msg, sizeof(MSG));
    180180        }
    181         return (LONG)WinDispatchMsg(thdb->hab, &os2msg);
     181        if(os2msg.hwnd || os2msg.msg == WM_QUIT) {
     182            return (LONG)WinDispatchMsg(thdb->hab, &os2msg);
     183        }
     184        //SvL: Don't dispatch messages sent by PostThreadMessage (correct??)
     185        return 0;
     186
    182187  }
    183188  else {//is this allowed?
     
    225230        while(rc == FALSE);
    226231
    227         return rc;
     232    return (pMsg->message == WINWM_QUIT);
    228233  }
    229234  else
     
    236241    } while (eaten);
    237242  }
    238   if(rc) {
    239         OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode, MSG_REMOVE);
    240         memcpy(MsgThreadPtr, &os2msg, sizeof(QMSG));
    241   }
     243  OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode, MSG_REMOVE);
     244  memcpy(MsgThreadPtr, &os2msg, sizeof(QMSG));
    242245  return rc;
    243246}
Note: See TracChangeset for help on using the changeset viewer.