Ignore:
Timestamp:
Nov 26, 1999, 6:06:09 PM (26 years ago)
Author:
cbratschi
Message:

map rect, WM_ERASEBKGND and other fixes

File:
1 edited

Legend:

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

    r1831 r1849  
    1 /* $Id: pmwindow.cpp,v 1.56 1999-11-24 19:32:22 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.57 1999-11-26 17:06:08 cbratschi Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    178178   ScreenWidth  = desktopRectl.xRight;
    179179   ScreenHeight = desktopRectl.yTop;
    180    
    181    
     180
     181
    182182   HDC   hdc;              /* Device-context handle                */
    183183   /* context data structure */
    184184   DEVOPENSTRUC dop = {NULL, "DISPLAY", NULL, NULL, NULL, NULL,
    185185                       NULL, NULL, NULL};
    186  
     186
    187187   /* create memory device context */
    188188   hdc = DevOpenDC(hab, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&dop, NULLHANDLE);
     
    213213  }
    214214  if(msg == WIN32APP_POSTMSG && (ULONG)mp1 == WIN32PM_MAGIC) {
    215         //win32 app user message     
    216         win32wnd->PostMessage((POSTMSG_PACKET *)mp2);
     215        //win32 app user message
     216        win32wnd->PostMessage((POSTMSG_PACKET *)mp2);
    217217        return (MRESULT)0;
    218218  }
     
    869869    {
    870870        dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle()));
     871        //CB: handled in WM_PAINT too, don't do it twice!
     872
    871873        if (WinQueryUpdateRect (hwnd, NULL) && !win32wnd->isSupressErase()) {
    872874            BOOL erased = sendEraseBkgnd (win32wnd);
    873875            win32wnd->setEraseBkgnd (!erased, !erased);
    874876        }
     877
    875878        break;
    876879    }
    877880
    878881    case WM_PAINT:
     882    {
    879883        dprintf(("OS2: WM_PAINT %x", hwnd));
    880884
     
    885889            }
    886890        }
     891
    887892        win32wnd->setSupressErase (FALSE);
    888893
    889         if(win32wnd->MsgPaint(0, 0)) {
    890                 goto RunDefWndProc;
    891         }
    892         //Apparently there are apps that return 0, but don't do anything during WM_PAINT
     894        win32wnd->MsgPaint(0, 0);
     895
     896        //validate the update region, WM_PAINT has no return value
    893897        goto RunDefWndProc;
     898    }
    894899
    895900    case WM_HITTEST:
Note: See TracChangeset for help on using the changeset viewer.