Ignore:
Timestamp:
Jan 12, 2000, 6:37:29 PM (26 years ago)
Author:
cbratschi
Message:

fixed WM_CALCVALIDRECTS, added region for WM_NCPAINT

File:
1 edited

Legend:

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

    r2353 r2421  
    1 /* $Id: dc.cpp,v 1.10 2000-01-07 17:38:46 cbratschi Exp $ */
     1/* $Id: dc.cpp,v 1.11 2000-01-12 17:37:28 cbratschi Exp $ */
    22
    33/*
     
    553553   if (updateRegionExists)
    554554   {
     555      //CB: for PM empty rect is valid
     556      if ((rectl.xLeft == rectl.xRight) || (rectl.yTop == rectl.yBottom)) return FALSE;
    555557      //SvL: Hack for memory.exe (doesn't get repainted properly otherwise)
    556558//      if (wnd->isOwnDC() && wnd->getOwnDC())
     
    604606
    605607   if (updateRegionExists)
     608   {
     609     //CB: for PM empty rect is valid
     610     if ((rectl.xLeft == rectl.xRight) || (rectl.yTop == rectl.yBottom)) return FALSE;
    606611     mapOS2ToWin32Rect(hwnd,(PRECTLOS2)&rectl,pRect);
    607    else
    608      pRect->left = pRect->top = pRect->right = pRect->bottom = 0;
     612   } else
     613       pRect->left = pRect->top = pRect->right = pRect->bottom = 0;
    609614
    610615   return updateRegionExists;
     
    722727      ULONG BytesNeeded;
    723728      PRGNDATA_W RgnData;
    724       PRECTL pr;
     729      PRECT pr;
    725730      int i;
    726       LONG height = OSLibQueryScreenHeight();
     731      RECTL rectl;
    727732
    728733      if (!hrgn)
     
    736741
    737742      i = RgnData->rdh.nCount;
    738       pr = (PRECTL)(RgnData->Buffer);
     743      pr = (PRECT)(RgnData->Buffer);
    739744
    740745      success = TRUE;
    741746      if (flags & DCX_EXCLUDERGN_W)
     747      {
     748#if 0 //CB: todo
    742749         for (; (i > 0) && success; i--, pr++) {
    743750            LONG y = pr->yBottom;
     
    747754            success &= GpiExcludeClipRectangle (pHps->hps, pr);
    748755         }
    749       else
    750          for (; (i > 0) && success; i--, pr++) {
    751             LONG y = pr->yBottom;
    752 
    753             pr->yBottom = height - pr->yTop;
    754             pr->yTop    = height - y;
    755             success &= GpiIntersectClipRectangle (pHps->hps, pr);
    756          }
     756#endif
     757      } else //DCX_INTERSECTRGN_W
     758      {
     759        O32_SelectClipRgn(pHps->hps,hrgn); //CB: works so far
     760      }
    757761      if (!success)
    758762         goto error;
Note: See TracChangeset for help on using the changeset viewer.