Changeset 2140 for trunk/src


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

removed CS_SIZEREDRAW

Location:
trunk/src/user32
Files:
5 edited

Legend:

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

    r1944 r2140  
    1 /* $Id: button.cpp,v 1.21 1999-12-02 16:34:42 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.22 1999-12-19 17:46:24 cbratschi Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    943943
    944944        rtext.right -= checkBoxWidth + 4;
     945        //CB: space for focus rect
     946        rtext.left++;
     947        rtext.right++;
    945948        rbox.left = rbox.right - checkBoxWidth;
    946949    }
  • 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
  • trunk/src/user32/pmwindow.cpp

    r2084 r2140  
    1 /* $Id: pmwindow.cpp,v 1.65 1999-12-16 00:11:45 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.66 1999-12-19 17:46:25 cbratschi Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    156156     (PFNWP)Win32WindowProc,            /* Address of window procedure  */
    157157//     CS_SIZEREDRAW | CS_HITTEST | CS_MOVENOTIFY,
    158      CS_SIZEREDRAW | CS_HITTEST,
     158     //CS_SIZEREDRAW | CS_HITTEST,
     159     CS_HITTEST,
    159160     NROF_WIN32WNDBYTES)) {
    160161        dprintf(("WinRegisterClass Win32BaseWindow failed"));
     
    376377        }
    377378
    378         PRECT lpRect = win32wnd->getWindowRect();
     379        PRECT lpRect = win32wnd->getWindowRect();
    379380        //SvL: Only send it when the client has changed & the frame hasn't
    380381        //     If the frame size/position has changed, pmframe.cpp will send
    381382        //     this message
    382         if(lpRect->right == wp.x+wp.cx && lpRect->bottom == wp.y+wp.cy) {
    383                 win32wnd->MsgPosChanged((LPARAM)&wp);
    384         }
    385         else    win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);
     383        if(lpRect->right == wp.x+wp.cx && lpRect->bottom == wp.y+wp.cy) {
     384                win32wnd->MsgPosChanged((LPARAM)&wp);
     385        }
     386        else    win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);
    386387
    387388        goto RunDefWndProc;
     
    419420    {
    420421        dprintf(("OS2: WM_MINMAXFRAME"));
    421         break;
     422        break;
    422423    }
    423424    case WM_OWNERPOSCHANGE:
     
    784785
    785786    case WM_INITMENU:
    786         win32wnd->MsgInitMenu((HWND)mp2);
    787         break;
     787        win32wnd->MsgInitMenu((HWND)mp2);
     788        break;
    788789
    789790    case WM_MENUSELECT:
  • trunk/src/user32/win32wbase.cpp

    r2114 r2140  
    1 /* $Id: win32wbase.cpp,v 1.114 1999-12-18 16:31:50 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.115 1999-12-19 17:46:25 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    146146  fInternalMsg     = FALSE;
    147147  fNoSizeMsg       = FALSE;
     148  fMovingChildren  = FALSE;
    148149  fIsDestroyed     = FALSE;
    149150  fDestroyWindowCalled = FALSE;
     
    855856ULONG Win32BaseWindow::MsgPosChanging(LPARAM lp)
    856857{
    857     if(fNoSizeMsg)
     858    if(fNoSizeMsg || (getParent() && getParent()->InMovingChildren()))
    858859        return 1;
    859860
     
    864865ULONG Win32BaseWindow::MsgPosChanged(LPARAM lp)
    865866{
    866     if(fNoSizeMsg)
     867    if(fNoSizeMsg || (getParent() && getParent()->InMovingChildren()))
    867868        return 1;
    868869
     
    874875{
    875876    dprintf(("MsgMove to (%d,%d)", x, y));
    876     if(fNoSizeMsg)
     877    if(fNoSizeMsg || (getParent() && getParent()->InMovingChildren()))
    877878        return 1;
    878879
  • trunk/src/user32/win32wbase.h

    r2084 r2140  
    1 /* $Id: win32wbase.h,v 1.54 1999-12-16 00:11:47 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.55 1999-12-19 17:46:26 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    4747        ULONG           wParam;
    4848        ULONG           lParam;
    49         ULONG           fUnicode;
     49        ULONG           fUnicode;
    5050} POSTMSG_PACKET;
    5151
    52 #define BROADCAST_SEND          0
    53 #define BROADCAST_POST          1
     52#define BROADCAST_SEND          0
     53#define BROADCAST_POST          1
    5454
    5555class Win32BaseWindow : public GenericObject, public ChildWindow
     
    9595         char  *MsgGetText();
    9696         ULONG  MsgContextMenu(ULONG x,ULONG y);
    97         void   MsgInitMenu(HWND hMenu);
     97        void   MsgInitMenu(HWND hMenu);
    9898         VOID   updateWindowStyle(DWORD oldExStyle,DWORD oldStyle);
    9999
     
    119119virtual  BOOL   isMDIChild();
    120120
    121         BOOL   fHasParentDC()                  { return fParentDC; };
     121        BOOL   fHasParentDC()                  { return fParentDC; };
    122122
    123123Win32BaseWindow *getParent();
     
    181181         HWND   getOS2HwndModalDialog()       { return OS2HwndModalDialog; };
    182182         BOOL   CanReceiveSizeMsgs()          { return !fNoSizeMsg; };
     183         BOOL   InMovingChildren()            { return fMovingChildren; };
     184         VOID   setMovingChildren(BOOL fMC)   { fMovingChildren = fMC; };
    183185         BOOL   IsWindowDestroyed()           { return fIsDestroyed; };
    184186         BOOL   IsWindowEnabled();
    185187         BOOL   IsWindowVisible();
    186         //Created with CreateWindowExA or ExW
    187 //         BOOL   IsUnicode()                   { return isUnicode; };
    188         //Window procedure type
    189          BOOL   IsWindowUnicode();     
     188        //Created with CreateWindowExA or ExW
     189//         BOOL   IsUnicode()                   { return isUnicode; };
     190        //Window procedure type
     191         BOOL   IsWindowUnicode();
    190192
    191193         BOOL   GetWindowRect(PRECT pRect);
     
    232234
    233235           BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam);
    234            BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
    235            BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam);
     236           BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
     237           BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam);
    236238
    237239         HWND   getNextDlgTabItem(HWND hwndCtrl, BOOL fPrevious);
     
    302304                                        //sent by PM and those sent by apps
    303305        BOOL    fNoSizeMsg;
     306        BOOL    fMovingChildren;
    304307        BOOL    fIsDestroyed;
    305308        BOOL    fDestroyWindowCalled;   //DestroyWindow was called for this window
    306309        BOOL    fCreated;
    307         BOOL    fTaskList;              //should be listed in PM tasklist or not
    308         BOOL    fParentDC;
    309 
    310         DWORD   dwThreadId;             //id of thread that created this window
    311         DWORD   dwProcessId;            //id of process that created this window
     310        BOOL    fTaskList;              //should be listed in PM tasklist or not
     311        BOOL    fParentDC;
     312
     313        DWORD   dwThreadId;             //id of thread that created this window
     314        DWORD   dwProcessId;            //id of process that created this window
    312315        PVOID   pOldFrameProc;
    313316        ULONG   borderWidth;
Note: See TracChangeset for help on using the changeset viewer.