Ignore:
Timestamp:
Dec 19, 1999, 6:46:26 PM (26 years ago)
Author:
cbratschi
Message:

removed CS_SIZEREDRAW

File:
1 edited

Legend:

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

    r2114 r2140  
    1 /* $Id: pmframe.cpp,v 1.27 1999-12-18 16:31:49 cbratschi Exp $ */
     1/* $Id: pmframe.cpp,v 1.28 1999-12-19 17:46:24 cbratschi Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    2626
    2727#define PMFRAMELOG
     28
     29#define GCL_STYLE_W           (-26)
     30#define CS_VREDRAW_W          0x0001
     31#define CS_HREDRAW_W          0x0002
    2832
    2933//******************************************************************************
     
    333337        SetWin32TIB();
    334338
     339        if (win32wnd->getParent() && win32wnd->getParent()->InMovingChildren())
     340          goto PosChangedEnd; //same Win32 pos, only OS/2 pos changed
     341
    335342        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0)
    336343            goto PosChangedEnd;
     
    352359        win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);
    353360
    354         if(!win32wnd->CanReceiveSizeMsgs())
    355             goto PosChangedEnd;
    356 
    357361        wp.hwnd = win32wnd->getWindowHandle();
    358362        if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
     
    362366        }
    363367
     368#if 0 //CB: PM does it now for us (-> WM_CALVALIDRECTS)
     369      //    if you remove this code, delete *MovingChildren in Win32BaseWindow class
    364370        if (yDelta != 0 || xDelta != 0)
    365371        {
    366             HENUM henum = WinBeginEnumWindows(WinWindowFromID(pswp->hwnd, FID_CLIENT));
     372            HENUM henum = WinBeginEnumWindows(WinWindowFromID(hwnd,FID_CLIENT));
    367373            SWP swp[10];
    368374            int i = 0;
    369375            HWND hwnd;
    370376
     377            win32wnd->setMovingChildren(TRUE);
    371378            while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE)
    372379            {
    373 #if 0
    374                 if (mdiClient )
    375                 {
    376                   continue;
    377                 }
    378 #endif
    379380                WinQueryWindowPos(hwnd, &(swp[i]));
    380381
     
    385386#endif
    386387
    387                 if(swp[i].y != 0) //CB: y value of 0 is valid!
     388                //if(swp[i].y != 0) //CB: y value of 0 is valid!
    388389                {
    389390                    //child window at offset <> 0 from client area -> offset now changes
    390391                    swp[i].y  += yDelta;
    391                     swp[i].fl &= ~(SWP_NOREDRAW);
     392                    swp[i].fl = SWP_MOVE | SWP_NOADJUST;
    392393                }
    393394                //else child window with the same start coordinates as the client area
     
    409410            if (i)
    410411               WinSetMultWindowPos(GetThreadHAB(), swp, i);
     412            win32wnd->setMovingChildren(FALSE);
    411413        }
    412414        if (yDelta != 0)
     
    419421            }
    420422        }
     423#endif
     424        if(!win32wnd->CanReceiveSizeMsgs())
     425            goto PosChangedEnd;
     426
    421427        win32wnd->MsgPosChanged((LPARAM)&wp);
    422428
     
    424430        RestoreOS2TIB();
    425431        return rc;
     432    }
     433
     434    case WM_CALCVALIDRECTS:
     435    {
     436      PRECTL oldRect = (PRECTL)mp1,newRect = oldRect+1;
     437      UINT res = CVR_ALIGNLEFT | CVR_ALIGNTOP;
     438
     439      //CB: only used if CS_SIZEDRAW isn't set
     440      //    PM moves children -> fast, no flickering (if redraw flags not set)
     441      if (win32wnd->getWindowClass())
     442      {
     443        DWORD dwStyle = win32wnd->getWindowClass()->getClassLongA(GCL_STYLE_W);
     444
     445        if (dwStyle & CS_HREDRAW_W && newRect->xRight-newRect->xLeft != oldRect->xRight-oldRect->xLeft)
     446          res |= CVR_REDRAW;
     447        else if (dwStyle & CS_VREDRAW_W && newRect->yTop-newRect->yBottom != oldRect->yTop-oldRect->yBottom)
     448          res |= CVR_REDRAW;
     449      } else res |= CVR_REDRAW;
     450
     451      //CB: PM updates window frame (and unfortunately all other frame controls)
     452      RestoreOS2TIB();
     453      OldFrameProc(hwnd,msg,mp1,mp2);
     454      SetWin32TIB();
     455
     456      RestoreOS2TIB();
     457      return (MRESULT)res;
    426458    }
    427459
Note: See TracChangeset for help on using the changeset viewer.