Changeset 2379 for trunk/src


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

message translation fixes

Location:
trunk/src/user32/new
Files:
2 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}
  • trunk/src/user32/new/oslibmsgtranslate.cpp

    r2377 r2379  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.7 2000-01-08 16:47:46 cbratschi Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.8 2000-01-08 17:08:56 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    139139  if (!win32wnd) win32wnd = Win32BaseWindow::GetWindowFromOS2FrameHandle(os2Msg->hwnd);
    140140  //PostThreadMessage posts WIN32APP_POSTMSG msg without window handle
    141   if((win32wnd == 0) && (os2Msg->msg != WM_CREATE) && (os2Msg->msg != WIN32APP_POSTMSG))
     141  if(win32wnd == 0 && (os2Msg->msg != WM_CREATE && os2Msg->msg != WM_QUIT && os2Msg->msg != WIN32APP_POSTMSG))
    142142  {
    143143        goto dummymessage; //not a win32 client window
     
    147147  winMsg->pt.y = mapScreenY(os2Msg->ptl.y);
    148148
    149   if(win32wnd) //==0 for WM_CREATE
     149  if(win32wnd) //==0 for WM_CREATE/WM_QUIT
    150150    winMsg->hwnd = win32wnd->getWindowHandle();
    151151
Note: See TracChangeset for help on using the changeset viewer.