Ignore:
Timestamp:
Feb 18, 2001, 6:03:47 PM (25 years ago)
Author:
sandervl
Message:

ScrollWindowEx fix

File:
1 edited

Legend:

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

    r5164 r5171  
    1 /* $Id: dc.cpp,v 1.86 2001-02-18 14:18:38 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.87 2001-02-18 17:03:47 sandervl Exp $ */
    22
    33/*
     
    376376   PRECT pClient = window->getClientRectPtr();
    377377   PRECT pWindow = window->getWindowRect();
     378   RECT  rectWindow;
     379   RECTL rectWindowOS2;
    378380
    379381   if(pClient->left == 0 && pClient->top == 0 &&
     
    397399        //TODO: counter
    398400        dprintf2(("WARNING: selectClientArea %x; already selected! origin (%d,%d) original origin (%d,%d)", window->getWindowHandle(), rcltemp.xLeft, rcltemp.yBottom, pHps->ptlOrigin.x, pHps->ptlOrigin.y));
    399         RECT rectWindow;
    400         RECTL rectWindowOS2;
    401401        GetWindowRect(window->getWindowHandle(), &rectWindow);
    402402        mapWin32ToOS2Rect(OSLibGetScreenHeight(), &rectWindow, (PRECTLOS2)&rectWindowOS2);
     
    421421        pHps->ptlOrigin.y = rcltemp.yBottom;
    422422   }
    423 
    424423   dprintf2(("selectClientArea %x: (%d,%d) -> (%d,%d)", window->getWindowHandle(), rcltemp.xLeft, rcltemp.yBottom, rcl.xLeft, rcl.yBottom));
    425424
     
    428427
    429428   hrgnRect = GreCreateRectRegion(pHps->hps, &rcl, 1);
     429#if 0
     430   if(window->getParent())
     431   {
     432     HRGN hrgnParentClip;
     433
     434        pClient = window->getParent()->getClientRectPtr();
     435        GetWindowRect(window->getParent()->getWindowHandle(), &rectWindow);
     436        rectWindow.right   = rectWindow.left + pClient->right;
     437        rectWindow.left   += pClient->left;
     438        rectWindow.bottom  = rectWindow.top + pClient->bottom;
     439        rectWindow.top    += pClient->top;
     440        mapWin32ToOS2Rect(OSLibGetScreenHeight(), &rectWindow, (PRECTLOS2)&rectWindowOS2);
     441
     442        hrgnParentClip = GreCreateRectRegion(pHps->hps, &rectWindowOS2, 1);
     443        GreCombineRegion(pHps->hps, hrgnRect, hrgnParentClip, hrgnRect, CRGN_AND);
     444        GreDestroyRegion(pHps->hps, hrgnParentClip);
     445   }
     446#endif
    430447
    431448   // Query the visible region
     
    451468   // Destroy the region now we have finished with it.
    452469   GreDestroyRegion(pHps->hps, hrgnRect);
     470
     471//testestest
     472   GpiQueryViewingLimits(pHps->hps, &rectWindowOS2);
     473   dprintf(("view limits (%d,%d)(%d,%d)", rectWindowOS2.xLeft, rectWindowOS2.yBottom, rectWindowOS2.xRight, rectWindowOS2.yTop));
     474   GpiQueryDefViewingLimits(pHps->hps, &rectWindowOS2);
     475   dprintf(("def view limits (%d,%d)(%d,%d)", rectWindowOS2.xLeft, rectWindowOS2.yBottom, rectWindowOS2.xRight, rectWindowOS2.yTop));
     476   GpiQueryPageViewport(pHps->hps, &rectWindowOS2);
     477   dprintf(("page viewport (%d,%d)(%d,%d)", rectWindowOS2.xLeft, rectWindowOS2.yBottom, rectWindowOS2.xRight, rectWindowOS2.yTop));
     478
     479   GpiQueryGraphicsField(pHps->hps, &rectWindowOS2);
     480   dprintf(("graphics field (%d,%d)(%d,%d)", rectWindowOS2.xLeft, rectWindowOS2.yBottom, rectWindowOS2.xRight, rectWindowOS2.yTop));
     481
     482   SIZEL size;
     483   GpiQueryPickApertureSize(pHps->hps, &size);
     484   dprintf(("page viewport (%d,%d)", size.cx, size.cy));
     485//testestest
     486
    453487}
    454488//******************************************************************************
     
    17031737                }
    17041738                rectChild = *child->getWindowRect();
    1705                 if(pRectUpdate || IntersectRect(&rectChild, &rectChild, &rc))
     1739                if(!pRectUpdate || IntersectRect(&rectChild, &rectChild, &rc))
    17061740                {
    17071741                     dprintf(("ScrollWindowEx: Scroll child window %x", hwndChild));
     
    17401774        ((lComplexity == RGN_RECT) || (lComplexity == RGN_COMPLEX)))
    17411775    {
    1742        rc = InvalidateRect (hwnd, &winRectUpdate, (scrollFlag & SW_ERASE_W) ? 1 : 0);
     1776       rc = RedrawWindow (hwnd, &winRectUpdate, NULLHANDLE,
     1777                          RDW_ALLCHILDREN_W | RDW_INVALIDATE_W |
     1778                          ((scrollFlag & SW_ERASE_W) ? RDW_ERASE_W : 0) |
     1779                          RDW_UPDATENOW_W);
     1780
     1781//       rc = InvalidateRect (hwnd, &winRectUpdate, (scrollFlag & SW_ERASE_W) ? 1 : 0);
    17431782       if (rc == FALSE)
    17441783       {
Note: See TracChangeset for help on using the changeset viewer.