Changeset 1267 for trunk/src


Ignore:
Timestamp:
Oct 13, 1999, 6:05:25 PM (26 years ago)
Author:
phaller
Message:

Fix: parameter checking in RedrawWindow and temp fix for MsgWaitForMultipleObjects

Location:
trunk/src/user32
Files:
2 edited

Legend:

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

    r1087 r1267  
    1 /* $Id: dc.cpp,v 1.11 1999-09-28 18:14:57 dengert Exp $ */
     1/* $Id: dc.cpp,v 1.12 1999-10-13 16:02:41 phaller Exp $ */
    22
    33/*
     
    88 */
    99
     10/*****************************************************************************
     11 * Includes                                                                  *
     12 *****************************************************************************/
     13
     14#include <odin.h>
     15#include <odinwrap.h>
     16#include <os2sel.h>
     17
    1018#define INCL_WIN
    1119#define INCL_GPI
     
    1422#include <os2.h>
    1523#include <pmddi.h>
    16 #include <os2sel.h>
    1724#include <stdlib.h>
    1825#include "win32type.h"
     
    2532#include "oslibwin.h"
    2633#include "dcdata.h"
     34
     35
     36ODINDEBUGCHANNEL(USER32-DC)
     37
    2738
    2839#undef SEVERITY_ERROR
     
    10171028// RDW_UPDATENOW
    10181029
    1019 BOOL WIN32API RedrawWindow (HWND hwnd, const RECT *pRect, HRGN hrgn, DWORD redraw)
     1030ODINFUNCTION4(BOOL,RedrawWindow,HWND,        hwnd,
     1031                                const RECT*, pRect,
     1032                                HRGN,        hrgn,
     1033                                DWORD,       redraw)
    10201034{
    10211035   Win32BaseWindow *wnd;
     
    10271041   }
    10281042
    1029    USHORT sel = RestoreOS2FS();
    1030  dprintf(("USER32: RedrawWindow %X, %X %X %X", hwnd, pRect, hrgn, redraw));
    1031 
    1032    if (hwnd == NULLHANDLE) {
     1043//@@@PH   USHORT sel = RestoreOS2FS();
     1044//@@@PH dprintf(("USER32: RedrawWindow %X, %X %X %X", hwnd, pRect, hrgn, redraw));
     1045
     1046   if (hwnd == NULLHANDLE)
     1047   {
    10331048      hwnd = HWND_DESKTOP;
    10341049      wnd  = Win32BaseWindow::GetWindowFromOS2Handle(OSLIB_HWND_DESKTOP);
     1050
     1051      if (!wnd)
     1052      {
     1053         dprintf(("USER32:dc: RedrawWindow can't find desktop window %08xh\n",
     1054                  hwnd));
     1055         _O32_SetLastError (ERROR_INVALID_PARAMETER);
     1056//@@@PH         SetFS(sel);
     1057         return FALSE;
     1058      }
     1059
    10351060   }
    10361061   else
     
    10401065      if (!wnd)
    10411066      {
     1067         dprintf(("USER32:dc: RedrawWindow can't find window %08xh\n",
     1068                  hwnd));
    10421069         _O32_SetLastError (ERROR_INVALID_PARAMETER);
    1043          SetFS(sel);
     1070//@@@PH         SetFS(sel);
    10441071         return FALSE;
    10451072      }
     
    11791206      _O32_SetLastError (ERROR_INVALID_PARAMETER);
    11801207
    1181    SetFS(sel);
     1208//@@@PH   SetFS(sel);
    11821209   return (success);
    11831210}
  • trunk/src/user32/user32.cpp

    r1265 r1267  
    1 /* $Id: user32.cpp,v 1.40 1999-10-13 14:24:25 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.41 1999-10-13 16:02:42 phaller Exp $ */
    22
    33/*
     
    2222//Attention: many functions belong to other subsystems, move them to their
    2323//           right place!
     24
     25#include <odin.h>
     26#include <odinwrap.h>
     27#include <os2sel.h>
    2428
    2529#include <os2win.h>
     
    7478// WIN32API YieldTask
    7579
     80ODINDEBUGCHANNEL(USER32-USER32)
     81
     82
    7683/* Coordinate Transformation */
    7784
     
    17961803
    17971804/* Synchronization Functions */
    1798 
    1799 DWORD WIN32API MsgWaitForMultipleObjects( DWORD nCount, LPHANDLE pHandles, BOOL fWaitAll, DWORD dwMilliseconds, DWORD  dwWakeMask)
    1800 {
    1801 #ifdef DEBUG
    1802     WriteLog("USER32:  MsgWaitForMultipleObjects\n");
    1803 #endif
    1804     return O32_MsgWaitForMultipleObjects(nCount,pHandles,fWaitAll,dwMilliseconds,dwWakeMask);
     1805ODINFUNCTION5(DWORD,MsgWaitForMultipleObjects,DWORD,    nCount,
     1806                                              LPHANDLE, pHandles,
     1807                                              BOOL,     fWaitAll,
     1808                                              DWORD,    dwMilliseconds,
     1809                                              DWORD,    dwWakeMask)
     1810{
     1811  // @@@PH that's a really difficult function to implement
     1812
     1813  // @@@PH this is a temporary bugfix for WINFILE.EXE
     1814  if (nCount == 0)
     1815  {
     1816    // only listens to incoming thread messages.
     1817    return (WAIT_OBJECT_0);
     1818  }
     1819
     1820  return O32_MsgWaitForMultipleObjects(nCount,pHandles,fWaitAll,dwMilliseconds,dwWakeMask);
    18051821}
    18061822
Note: See TracChangeset for help on using the changeset viewer.