Ignore:
Timestamp:
Sep 21, 1999, 7:05:36 PM (26 years ago)
Author:
dengert
Message:

erase background/paint stuff enhanced

File:
1 edited

Legend:

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

    r996 r1000  
    1 /* $Id: pmwindow.cpp,v 1.3 1999-09-21 08:24:04 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.4 1999-09-21 17:05:36 dengert Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    2727#include "oslibgdi.h"
    2828#include "oslibmsg.h"
     29#include "dc.h"
    2930
    3031HMQ  hmq = 0;                             /* Message queue handle         */
     
    222223        }
    223224        classStyle = win32wnd->getClass()->getStyle();
    224 //        if (yDelta != 0)
    225225        if ((yDelta != 0) && ((classStyle & CS_VREDRAW_W) ||
    226226           ((classStyle & CS_HREDRAW_W) && (pswp->cx != pswpo->cx))))
     
    231231            HWND hwnd;
    232232
    233             dprintf(("move children"));
    234233            while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE)
    235234            {
    236235#if 0
    237                /* Do not move MDI clients.  MDI clients are a special case,
    238                 * even though they are bottom aligned they are always supposed
    239                 * to be the same size as their parent.  This code is an
    240                 * optimization and will not work correctly if the this
    241                 * assumption is incorrect.
    242                 */
    243                WinBase *pBase = (WinBase *)WinQueryDAXData( hwnd );
    244                if ( pBase && pBase->typeOf() == mdiClient )
     236               if (mdiClient )
    245237               {
    246238                  continue;
    247239               }
    248240#endif
    249                // We don't know how many children we have so we'll move ten
    250                // at a time.  Not very nice, I know.
    251241               WinQueryWindowPos(hwnd, &(swp[i]));
    252 
    253                // The SWP flags are all set but PM will ignore any
    254                // superflous ones, so keep them as they contain useful
    255                // minimise and maximise flags.
    256242               swp[i].y += yDelta;
    257243
     
    269255            WinEndEnumWindows(henum);
    270256
    271             // Any remaining windows?
    272257            if (i)
    273258               WinSetMultWindowPos(GetThreadHAB(), swp, i);
     
    280265    case WM_ERASEBACKGROUND:
    281266    {
    282         if(win32wnd->MsgEraseBackGround(0)) {
    283                 goto RunDefWndProc;
     267        if (!win32wnd->isSupressErase()) {
     268            BOOL erased = sendEraseBkgnd (win32wnd);
     269            win32wnd->setEraseBkgnd (!erased, !erased);
    284270        }
    285271        break;
     
    558544
    559545    case WM_TIMER:
    560         win32wnd->MsgTimer((ULONG)mp1);
     546        win32wnd->MsgTimer((ULONG)mp1);
    561547        goto RunDefWndProc;
    562548
     
    592578    case WM_PAINT:
    593579        dprintf(("OS2: WM_PAINT %x", hwnd));
     580
     581        if (WinQueryUpdateRect (hwnd, NULL)) {
     582            if (!win32wnd->isSupressErase()) {
     583                BOOL erased = sendEraseBkgnd (win32wnd);
     584                win32wnd->setEraseBkgnd (!erased, !erased);
     585            }
     586        }
     587        win32wnd->setSupressErase (FALSE);
     588
    594589        if(win32wnd->MsgPaint(0, 0)) {
    595590                goto RunDefWndProc;
Note: See TracChangeset for help on using the changeset viewer.