Changeset 1495 for trunk/src


Ignore:
Timestamp:
Oct 28, 1999, 8:22:31 PM (26 years ago)
Author:
sandervl
Message:

message fixes

Location:
trunk/src/user32
Files:
4 edited

Legend:

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

    r1307 r1495  
    1 /* $Id: oslibmsg.cpp,v 1.4 1999-10-15 10:03:14 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.5 1999-10-28 18:22:26 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    3737} MSGTRANSTAB, *PMSGTRANSTAB;
    3838
    39 #define MAX_MSGTRANSTAB 12
     39#define MAX_MSGTRANSTAB 15
    4040MSGTRANSTAB MsgTransTab[MAX_MSGTRANSTAB] = {
    4141   0x0000, 0x0000,  // WM_NULL,            WM_NULL
     42   0x0024, 0x0113,  // WM_TIMER,           WM_TIMER
     43   0x0029, 0x0010,  // WM_CLOSE,           WM_CLOSE
     44   0x002a, 0x0012,  // WM_QUIT,            WM_QUIT
    4245   0x0070, 0x0200,  // WM_MOUSEMOVE,       WM_MOUSEMOVE
    4346   0x0071, 0x0201,  // WM_BUTTON1DOWN,     WM_LBUTTONDOWN
     
    131134void OSLibWinPostQuitMessage(ULONG nExitCode)
    132135{
    133   WinPostQueueMsg(NULLHANDLE, WM_QUIT, (MPARAM)nExitCode, 0);
     136 APIRET rc;
     137
     138  rc = WinPostQueueMsg(NULLHANDLE, WM_QUIT, (MPARAM)nExitCode, 0);
     139  dprintf(("WinPostQueueMsg %d returned %d", nExitCode, rc));
    134140}
    135141//******************************************************************************
     
    137143LONG OSLibWinDispatchMsg(MSG *msg, BOOL isUnicode)
    138144{
     145 BOOL eaten = 0;
     146
    139147//TODO: What to do if app changed msg? (translate)
    140148//  WinToOS2MsgTranslate(msg, &qmsg, isUnicode);
     149
     150  //SvL: Some apps use PeeKMessage(remove) & DispatchMessage instead of
     151  //     GetMessage/DispatchMessage
     152  if (MsgThreadPtr->msg == WM_TIMER)
     153      eaten = TIMER_HandleTimer (MsgThreadPtr);
     154 
     155  if(eaten)     return 0;
    141156
    142157  return (LONG)WinDispatchMsg(GetThreadHAB(), MsgThreadPtr);
  • trunk/src/user32/pmwindow.cpp

    r1446 r1495  
    1 /* $Id: pmwindow.cpp,v 1.45 1999-10-25 20:17:20 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.46 1999-10-28 18:22:27 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    786786          ULONG id;
    787787
     788          dprintf(("OS2: WM_TIMER %x %d", hwnd, mp1));
    788789          if (TIMER_GetTimerInfo(hwnd,(ULONG)mp1,&sys,&id))
    789790          {
  • trunk/src/user32/user32.cpp

    r1418 r1495  
    1 /* $Id: user32.cpp,v 1.47 1999-10-23 16:45:22 cbratschi Exp $ */
     1/* $Id: user32.cpp,v 1.48 1999-10-28 18:22:28 sandervl Exp $ */
    22
    33/*
     
    11761176}
    11771177
    1178 /* Timer Functions */
    1179 
    1180 #if 0
    1181 BOOL WIN32API KillTimer(HWND hWnd, UINT uIDEvent)
    1182 {
    1183 #ifdef DEBUG
    1184     WriteLog("USER32:  KillTimer\n");
    1185 #endif
    1186     hWnd = Win32Window::Win32ToOS2Handle(hWnd);
    1187     //WinStopTimer
    1188     //CB: replace
    1189     return O32_KillTimer(hWnd,uIDEvent);
    1190 }
    1191 //******************************************************************************
    1192 //******************************************************************************
    1193 UINT WIN32API SetTimer( HWND hwnd, UINT idTimer, UINT uTimeout, TIMERPROC  tmprc)
    1194 {
    1195 #ifdef DEBUG
    1196     WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
    1197 #endif
    1198     hwnd = Win32Window::Win32ToOS2Handle(hwnd);
    1199     //SvL: Write callback handler class for this one
    1200     //CB: replace
    1201     return O32_SetTimer(hwnd,idTimer,uTimeout,(TIMERPROC_O32)tmprc);
    1202 }
    1203 #endif
    1204 
    12051178/* Process and Thread Functions */
    12061179
  • trunk/src/user32/windowclass.cpp

    r1193 r1495  
    1 /* $Id: windowclass.cpp,v 1.2 1999-10-08 16:28:21 sandervl Exp $ */
     1/* $Id: windowclass.cpp,v 1.3 1999-10-28 18:22:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Code for OS/2
     
    181181        wndclass->getClassInfo(&wc);
    182182        memcpy(lpwc, &wc.style, sizeof(WNDCLASSW));
    183         return(TRUE);
     183       return(TRUE);
    184184  }
    185185  return(FALSE);
     
    215215  if(wndclass) {
    216216        wndclass->getClassInfo(lpwcx);
     217        lpwcx->cbSize = sizeof(WNDCLASSEXA);
    217218        return(TRUE);
    218219  }
     
    256257  if(wndclass) {
    257258        wndclass->getClassInfo(lpwcx);
     259        lpwcx->cbSize = sizeof(WNDCLASSEXW);
    258260        return(TRUE);
    259261  }
Note: See TracChangeset for help on using the changeset viewer.