Changeset 1000 for trunk/src


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

erase background/paint stuff enhanced

Location:
trunk/src/user32
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r996 r1000  
    1 # $Id: Makefile,v 1.19 1999-09-21 08:24:04 sandervl Exp $
     1# $Id: Makefile,v 1.20 1999-09-21 17:05:36 dengert Exp $
    22
    33#
     
    103103win32wndhandle.obj: win32wndhandle.cpp win32wndhandle.h
    104104
    105 pmwindow.obj:   pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h
     105pmwindow.obj:   pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h dc.h
    106106win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h
    107107win32wbase.obj:   win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h
  • trunk/src/user32/dc.cpp

    r962 r1000  
    1 /* $Id: dc.cpp,v 1.2 1999-09-16 18:00:43 dengert Exp $ */
     1/* $Id: dc.cpp,v 1.3 1999-09-21 17:03:29 dengert Exp $ */
    22
    33/*
     
    739739   pHps->hdcType = TYPE_3;
    740740   lpps->hdc = (HDC)hps;
    741    lpps->fErase = !wnd->MsgEraseBackGround(lpps->hdc);
     741
     742   if (wnd->isEraseBkgnd())
     743       wnd->setEraseBkgnd (FALSE, !wnd->MsgEraseBackGround(lpps->hdc));
     744   wnd->setSupressErase (FALSE);
     745   lpps->fErase = wnd->isPSErase();
    742746
    743747   if (!hPS_ownDC)
     
    11191123   if (redraw & RDW_UPDATENOW_W) redraw &= ~RDW_ERASENOW_W;
    11201124
     1125   if (redraw & RDW_NOERASE_W)
     1126      wnd->setEraseBkgnd (FALSE);
     1127
     1128   if (redraw & RDW_UPDATENOW_W)
     1129      wnd->setSupressErase (FALSE);
     1130   else if (redraw & RDW_ERASENOW_W)
     1131      wnd->setSupressErase (FALSE);
    11211132#if 0
    1122    if (redraw & RDW_NOERASE_W)
    1123       setEraseBkgnd (FALSE);
    1124 
    1125    if (redraw & RDW_UPDATENOW_W)
    1126       setSupressErase (TRUE, FALSE);
    1127    else if (redraw & RDW_ERASENOW_W)
    1128       setSupressErase (FALSE, FALSE);
    11291133   else
    11301134   {
    11311135      QMSG qmsg;
    1132       BOOL bErase;
    1133 
    1134       bErase = (WinPeekMsg (HABX, &qmsg, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)
     1136      BOOL erase;
     1137
     1138      erase = (WinPeekMsg (HABX, &qmsg, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)
    11351139                && (redraw & RDW_NOERASE_W) == 0);
    11361140
    1137       setSupressErase (FALSE, !bErase);
     1141      wnd->setSupressErase (!erase);
    11381142   }
    11391143
     
    11861190   if (redraw & RDW_INVALIDATE_W)
    11871191   {
    1188 //      if (redraw & RDW_ERASE_W)
    1189 //         setEraseBkgnd (TRUE, TRUE);
     1192      if (redraw & RDW_ERASE_W)
     1193         wnd->setEraseBkgnd (TRUE, TRUE);
    11901194
    11911195      if (!pRect && !hrgn)
     
    12161220         wnd->MsgPaint (0, FALSE);
    12171221
    1218 //      else if ((redraw & RDW_ERASE_W) && (redraw & RDW_ERASENOW_W))
    1219 //         setEraseBkgnd (FALSE, !sendEraseBkgnd (wnd));
     1222      else if ((redraw & RDW_ERASE_W) && (redraw & RDW_ERASENOW_W))
     1223         wnd->setEraseBkgnd (FALSE, !sendEraseBkgnd (wnd));
    12201224   }
    12211225   else if ((redraw & RDW_INTERNALPAINT_W) && !(redraw & RDW_INVALIDATE_W))
     
    12351239      WinReleasePS (hpsTemp);
    12361240
    1237 //   if ((redraw & RDW_INVALIDATE_W) == 0)
    1238 //      setSupressErase (FALSE, FALSE);
    1239 //   else if ((redraw & RDW_ERASENOW_W) == RDW_ERASENOW_W)
    1240 //      setSupressErase (FALSE, TRUE);
     1241   if ((redraw & RDW_INVALIDATE_W) == 0)
     1242      wnd->setSupressErase (FALSE);
     1243   else if ((redraw & RDW_ERASENOW_W) == RDW_ERASENOW_W)
     1244      wnd->setSupressErase (TRUE);
    12411245
    12421246//   if (!success)
  • trunk/src/user32/dc.h

    r949 r1000  
    1 /* $Id: dc.h,v 1.1 1999-09-15 23:18:49 sandervl Exp $ */
     1/* $Id: dc.h,v 1.2 1999-09-21 17:03:29 dengert Exp $ */
    22/*
    33 * public dc functions
     
    1313#define __DC_H__
    1414
     15extern HDC sendEraseBkgnd (Win32BaseWindow *wnd);
    1516extern void releaseOwnDC (HDC hps);
    1617
  • trunk/src/user32/oslibwin.cpp

    r963 r1000  
    1 /* $Id: oslibwin.cpp,v 1.2 1999-09-17 18:49:53 dengert Exp $ */
     1/* $Id: oslibwin.cpp,v 1.3 1999-09-21 17:04:26 dengert Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    157157//******************************************************************************
    158158//******************************************************************************
     159ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)
     160{
     161  return (ULONG)WinSendMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);
     162}
     163//******************************************************************************
     164//******************************************************************************
    159165//******************************************************************************
    160166//******************************************************************************
     
    423429   ULONG flags = 0;
    424430
    425    //***************************************************
    426    // Map constant HWNDs (e.g. HWND_DESKTOP, HWND_TOP)
    427    //***************************************************
    428431   HWND  hWnd = (hWindow == HWND_DESKTOP) ? HWND_DESKTOP_W: hWindow;
    429432
    430    if ( hWndInsertAfter == HWND_TOP )
     433   if (hWndInsertAfter == HWND_TOP)
    431434      hWinAfter = HWND_TOP_W;
    432    else if ( hWndInsertAfter == HWND_BOTTOM )
     435   else if (hWndInsertAfter == HWND_BOTTOM)
    433436      hWinAfter = HWND_BOTTOM_W;
    434437   else
     
    446449   if (  fuFlags & SWP_HIDE)        flags |= SWP_HIDEWINDOW_W;
    447450
    448    //**************************************************************************
    449    // When moving or sizing we'll have to do some calculations for Y inversion.
    450    //
    451    // If moving - invert Y coord.
    452    //
    453    // If sizing - if the height is changing, have to move the window to
    454    //             maintain correct windows position.  If we just size then the
    455    //             TR corner will extend.  The Windows behaviour should be to
    456    //             extend the BR corner.
    457    //
    458    // If this is a child window then we'll have to move within the client
    459    // area of the parent.
    460    //
    461    // If this is an overlapped or popup window we'll have to move around
    462    // within the desktop.
    463    //**************************************************************************
    464    if ( fuFlags & (SWP_MOVE | SWP_SIZE) )
     451   if (fuFlags & (SWP_MOVE | SWP_SIZE))
    465452   {
    466453      if (hParent == NULLHANDLE)
     
    490477      if (fuFlags & SWP_SIZE)
    491478      {
    492          // If height is changing we MUST move to maintain top-left alignment
    493479         if (cy != pswpOld->cy)
    494480         {
     
    502488      }
    503489
    504       //**********************************************************
    505       // We'll need both a y and cy for the Y inversion code.
    506       // If either wasn't passed in, calculate the current value.
    507       //**********************************************************
    508490      if ((fuFlags & SWP_MOVE) == 0)
    509491      {
     
    512494      }
    513495
    514       //********************************************************
    515       // Y inversion here... old Y is top left corner of window
    516       // relative to top left of parent.
    517       //********************************************************
    518       y          = parentHeight - y - cy;
    519       LONG oldY  = parentHeight - pswpOld->y - pswpOld->cy;
    520 
    521       // Set the SWP_NOMOVE_W flag if the window has not moved in windows
    522       // coordinates.
    523       if ( ( pswpOld->x == x ) && ( oldY == y ) )
     496      y         = parentHeight - y - cy;
     497      LONG oldY = parentHeight - pswpOld->y - pswpOld->cy;
     498
     499      if ((pswpOld->x == x) && (oldY == y))
    524500         flags |= SWP_NOMOVE_W;
    525501
    526       // Set the SWP_NOSIZE_W flag if the window is not really being sized.
    527       if ( ( pswpOld->cx == cx ) && ( pswpOld->cy == cy ) )
     502      if ((pswpOld->cx == cx) && (pswpOld->cy == cy))
    528503         flags |= SWP_NOSIZE_W;
    529504   }
     
    544519         x,y,cx,cy, pswpOld->x,pswpOld->y,pswpOld->cx,pswpOld->cy));
    545520
    546    // Fill in the WINDOWPOS structure with the now calculated PM values.
    547521   pwpos->flags            = (UINT)flags;
    548522   pwpos->cy               = (int)cy;
     
    557531void OSLibMapWINDOWPOStoSWP(PWINDOWPOS pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame)
    558532{
    559    HWND hWnd              = pwpos->hwnd;
    560    HWND hWndInsertAfter   = pwpos->hwndInsertAfter;
    561    long x                 = pwpos->x;
    562    long y                 = pwpos->y;
    563    long cx                = pwpos->cx;
    564    long cy                = pwpos->cy;
    565    UINT fuFlags           = pwpos->flags;
     533   HWND hWnd            = pwpos->hwnd;
     534   HWND hWndInsertAfter = pwpos->hwndInsertAfter;
     535   long x               = pwpos->x;
     536   long y               = pwpos->y;
     537   long cx              = pwpos->cx;
     538   long cy              = pwpos->cy;
     539   UINT fuFlags         = pwpos->flags;
    566540   ULONG parentHeight;
    567541
    568542   HWND  hWinAfter;
    569543   ULONG flags = 0;
    570 
    571    //***************************************************
    572    // Map constant HWNDs (e.g. HWND_DESKTOP, HWND_TOP)
    573    //***************************************************
    574544   HWND  hWindow = hWnd ? (HWND)hWnd : HWND_DESKTOP;
    575545
    576    if ( hWndInsertAfter == HWND_TOPMOST_W )
     546   if (hWndInsertAfter == HWND_TOPMOST_W)
    577547//      hWinAfter = HWND_TOPMOST;
    578548      hWinAfter = HWND_TOP;
    579    else if ( hWndInsertAfter == HWND_NOTOPMOST_W )
     549   else if (hWndInsertAfter == HWND_NOTOPMOST_W)
    580550//      hWinAfter = HWND_NOTOPMOST;
    581551      hWinAfter = HWND_TOP;
    582    else if ( hWndInsertAfter == HWND_TOP_W )
     552   else if (hWndInsertAfter == HWND_TOP_W)
    583553      hWinAfter = HWND_TOP;
    584    else if ( hWndInsertAfter == HWND_BOTTOM_W )
     554   else if (hWndInsertAfter == HWND_BOTTOM_W)
    585555      hWinAfter = HWND_BOTTOM;
    586556   else
    587557      hWinAfter = (HWND) hWndInsertAfter;
    588558
    589    //***********************************
    590    // convert Windows flags to PM flags
    591    //***********************************
    592    if ( ! ( fuFlags & SWP_NOSIZE_W     ) ) flags |= SWP_SIZE;
    593    if ( ! ( fuFlags & SWP_NOMOVE_W     ) ) flags |= SWP_MOVE;
    594    if ( ! ( fuFlags & SWP_NOZORDER_W   ) ) flags |= SWP_ZORDER;
    595    if (     fuFlags & SWP_NOREDRAW_W   )   flags |= SWP_NOREDRAW;
    596    if ( ! ( fuFlags & SWP_NOACTIVATE_W ) ) flags |= SWP_ACTIVATE;
    597    if (     fuFlags & SWP_SHOWWINDOW_W )   flags |= SWP_SHOW;
    598    if (     fuFlags & SWP_HIDEWINDOW_W )   flags |= SWP_HIDE;
    599    /* no PM equivalent for SWP_FRAMECHANGED_W, SWP_NOCOPYBITS_W and SWP_NOOWNERZORDER_W */
    600 
    601    //**************************************************************************
    602    // When moving or sizing we'll have to do some calculations for Y inversion.
    603    //
    604    // If moving - invert Y coord.
    605    //
    606    // If sizing - if the height is changing, have to move the window to
    607    //             maintain correct windows position.  If we just size then the
    608    //             TR corner will extend.  The Windows behaviour should be to
    609    //             extend the BR corner.
    610    //
    611    // If this is a child window then we'll have to move within the client
    612    // area of the parent.
    613    //
    614    // If this is an overlapped or popup window we'll have to move around
    615    // within the desktop.
    616    //**************************************************************************
    617    if ( flags & (SWP_MOVE | SWP_SIZE) )
     559   if (!(fuFlags & SWP_NOSIZE_W    )) flags |= SWP_SIZE;
     560   if (!(fuFlags & SWP_NOMOVE_W    )) flags |= SWP_MOVE;
     561   if (!(fuFlags & SWP_NOZORDER_W  )) flags |= SWP_ZORDER;
     562   if (  fuFlags & SWP_NOREDRAW_W  )  flags |= SWP_NOREDRAW;
     563   if (!(fuFlags & SWP_NOACTIVATE_W)) flags |= SWP_ACTIVATE;
     564   if (  fuFlags & SWP_SHOWWINDOW_W)  flags |= SWP_SHOW;
     565   if (  fuFlags & SWP_HIDEWINDOW_W)  flags |= SWP_HIDE;
     566
     567   if (flags & (SWP_MOVE | SWP_SIZE))
    618568   {
    619569      if (hParent == NULLHANDLE)
     
    622572        parentHeight = OSLibGetWindowHeight(hParent);
    623573
    624       //**********************************************************
    625       // We'll need both a y and cy for the Y inversion code.
    626       // If either wasn't passed in, calculate the current value.
    627       //**********************************************************
    628574      if ((flags & SWP_MOVE) == 0)
    629575      {
     
    631577         y = pswpOld->y;
    632578
    633          // If the window is at (x,0) with a height of zero then this calculation
    634          // won't quite work.  Instead of calculating the Windows y coord, we set
    635          // it at (x,0).
    636          if (!(y == 0 && pswpOld->cy == 0))
     579         if (!((y == 0) && (pswpOld->cy == 0)))
    637580         {
    638             // convert Y coordinate back to Windows's for later conversion with new size
    639581            y = parentHeight - y - pswpOld->cy;
    640582         }
     
    643585      if (flags & SWP_SIZE)
    644586      {
    645          // If height is changing we MUST move to maintain top-left alignment
    646587         if (cy != pswpOld->cy)
    647588            flags |= SWP_MOVE;
     
    653594      }
    654595
    655       //********************************************************
    656       // Y inversion here... old Y is top left corner of window
    657       // relative to top left of parent.
    658       //********************************************************
    659596      y = parentHeight - y - cy;
    660597
    661       // Clear the SWP_MOVE flag if the window is not really being moved.
    662       if ( ( pswpOld->x == x ) && ( pswpOld->y == y ) )
     598      if ((pswpOld->x == x) && (pswpOld->y == y))
    663599         flags &= ~SWP_MOVE;
    664600
    665       // Clear the SWP_SIZE flag if the window is not really being sized.
    666       if ( ( pswpOld->cx == cx ) && ( pswpOld->cy == cy ) )
     601      if ((pswpOld->cx == cx) && (pswpOld->cy == cy))
    667602         flags &= ~SWP_SIZE;
    668603   }
    669604
    670    // Fill in the SWP structure with the now calculated PM values.
    671605   pswp->fl               = flags;
    672606   pswp->cy               = cy;
  • trunk/src/user32/oslibwin.h

    r963 r1000  
    1 /* $Id: oslibwin.h,v 1.2 1999-09-17 18:49:53 dengert Exp $ */
     1/* $Id: oslibwin.h,v 1.3 1999-09-21 17:04:27 dengert Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    4545
    4646BOOL  OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
     47ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
    4748
    4849#define WAOS_WARNING                 0
  • 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;
  • trunk/src/user32/user32.cpp

    r984 r1000  
    1 /* $Id: user32.cpp,v 1.27 1999-09-19 13:27:48 cbratschi Exp $ */
     1/* $Id: user32.cpp,v 1.28 1999-09-21 17:04:27 dengert Exp $ */
    22
    33/*
     
    88 * Copyright 1998 Peter Fitzsimmons
    99 * Copyright 1999 Christoph Bratschi
     10 * Copyright 1999 Daniela Engert (dani@ngrt.de)
    1011 *
    1112 *
  • trunk/src/user32/win32class.h

    r949 r1000  
    1 /* $Id: win32class.h,v 1.1 1999-09-15 23:19:00 sandervl Exp $ */
     1/* $Id: win32class.h,v 1.2 1999-09-21 17:04:27 dengert Exp $ */
    22/*
    33 * Win32 Window Class Managment Code for OS/2
     
    55 *
    66 * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
     7 * Copyright 1999      Daniela Engert (dani@ngrt.de)
    78 *
    89 */
  • trunk/src/user32/win32wbase.cpp

    r996 r1000  
    1 /* $Id: win32wbase.cpp,v 1.5 1999-09-21 08:24:05 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.6 1999-09-21 17:05:36 dengert Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    116116  menuResource       = NULL;
    117117  iconResource       = NULL;
     118
     119  EraseBkgndFlag     = TRUE;
     120  PSEraseFlag        = FALSE;
     121  SupressEraseFlag   = FALSE;
    118122}
    119123//******************************************************************************
     
    10271031
    10281032    if (hdcErase == 0)
    1029         hdcErase = GetDC(Win32Hwnd);
     1033        hdcErase = O32_GetDC(OS2Hwnd);
    10301034
    10311035    if(isIcon)
     
    10341038        rc = SendInternalMessageA(WM_ERASEBKGND, hdcErase, 0);
    10351039    if (hdc == 0)
    1036         ReleaseDC(Win32Hwnd, hdcErase);
     1040        O32_ReleaseDC(OS2Hwnd, hdcErase);
    10371041    return (rc);
    10381042}
     
    11801184        if (!windowClass->getBackgroundBrush()) return 0;
    11811185
    1182         /*  Since WM_ERASEBKGND may receive either a window dc or a    */
    1183         /*  client dc, the area to be erased has to be retrieved from  */
    1184         /*  the device context.                                    */
    11851186        rc = GetClipBox( (HDC)wParam, &rect );
    11861187        if ((rc == SIMPLEREGION) || (rc == COMPLEXREGION))
     
    15541555   dprintf (("SetWindowPos %x %x (%d,%d)(%d,%d) %x", Win32Hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags));
    15551556
    1556    /* Validate the flags passed in ...                   */
    1557    if ( fuFlags &
    1558         ~(SWP_NOSIZE     | SWP_NOMOVE     | SWP_NOZORDER     |
    1559           SWP_NOREDRAW   | SWP_NOACTIVATE | SWP_FRAMECHANGED |
    1560           SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS   |
    1561           SWP_NOOWNERZORDER) )
     1557   if (fuFlags &
     1558       ~(SWP_NOSIZE     | SWP_NOMOVE     | SWP_NOZORDER     |
     1559         SWP_NOREDRAW   | SWP_NOACTIVATE | SWP_FRAMECHANGED |
     1560         SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS   |
     1561         SWP_NOOWNERZORDER))
    15621562   {
    15631563      return FALSE;
     
    15671567   SWP swp, swpOld;
    15681568
    1569    //****************************
    1570    // Set up with Windows values.
    1571    //****************************
    15721569   wpos.flags            = fuFlags;
    15731570   wpos.cy               = cy;
     
    15781575   wpos.hwnd             = getWindowHandle();
    15791576
    1580    //**********************************************
    1581    // Convert from Windows to PM coords and flags.
    1582    //**********************************************
    15831577   if(~fuFlags & (SWP_NOMOVE | SWP_NOSIZE)) {
    15841578       if (isChild())
     
    15891583           OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
    15901584   }
     1585
    15911586   OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, hParent, OS2HwndFrame);
    1592 
    1593    /* MapSWP can clear the SWP_MOVE and SWP_SIZE flags if the window is not
    1594     * being moved or sized.  If these were the only operations to be done
    1595     * and they have been cleared, return now.
    1596     */
    15971587   if (swp.fl == 0)
    15981588      return TRUE;
    1599 
    1600    //*********************************************************************
    1601    //On Windows, a WM_GETMINMAXINFO is made to the app from within this API.
    1602    //We'll send a WM_QUERYTRACKINFO which is translated into a WM_GETMINMAXINFO
    1603    //and passed on to the app. Compare the values returned with the SWP cx and
    1604    //cy values.  They cannot be bigger than the max nor smaller than the min.
    1605    //*********************************************************************
    16061589
    16071590   if ((swp.fl & SWPOS_ZORDER) && (swp.hwndInsertBehind > HWNDOS_BOTTOM))
     
    16251608   dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl));
    16261609
    1627    //*****************************************************************************
    1628    // Squibble the window.  (WinSetMultWindowPos is faster than WinSetWindowPos.)
    1629    //*****************************************************************************
    16301610   rc = OSLibWinSetMultWindowPos(&swp, 1);
    16311611
     
    16361616   else
    16371617   {
    1638       /* To implement support for SWP_FRAMECHANGED_W correctly, we would need
    1639       ** to send a WM_NCCALCSIZE message. This means DAX would have to support
    1640       ** the WM_NCCALCSIZE message. I don't think DAX can support this
    1641       ** message because it is tightly bound with the architecture of
    1642       ** overlapped windows (the "just one window" architecture). However,
    1643       ** we *can* support the SWP_FRAMECHANGED flag by sending the window
    1644       ** a WM_UPDATEFRAME, which will provide the behavior of WM_NCCALCSIZE.
    1645       */
    1646 //      if (fuFlags & SWP_FRAMECHANGED_W)
    1647 //         WinSendMsg(hWindow, WM_UPDATEFRAME, (MPARAM)-1, 0);
     1618      if (fuFlags & SWP_FRAMECHANGED_W)
     1619         OSLibSendMessage (OS2HwndFrame, 0x42 /*WM_UPDATEFRAME*/, -1, 0);
    16481620   }
    16491621
  • trunk/src/user32/win32wbase.h

    r996 r1000  
    1 /* $Id: win32wbase.h,v 1.2 1999-09-21 08:24:05 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.3 1999-09-21 17:05:36 dengert Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    288288protected:
    289289         HDC    ownDC;
     290
     291         ULONG  EraseBkgndFlag:1,
     292                PSEraseFlag:1,
     293                SupressEraseFlag:1,
     294                filler:29;
     295public:
     296         VOID   setEraseBkgnd (BOOL erase, BOOL PSErase = FALSE)
     297                    { EraseBkgndFlag = erase; PSEraseFlag = PSErase; }
     298         VOID   setSupressErase (BOOL erase = FALSE)
     299                    { SupressEraseFlag = erase; }
     300         BOOL   isEraseBkgnd()   { return EraseBkgndFlag; }
     301         BOOL   isPSErase()      { return EraseBkgndFlag | PSEraseFlag; }
     302         BOOL   isSupressErase() { return SupressEraseFlag; }
    290303};
    291304
  • trunk/src/user32/wingdi.cpp

    r949 r1000  
    1 /* $Id: wingdi.cpp,v 1.1 1999-09-15 23:19:03 sandervl Exp $ */
     1/* $Id: wingdi.cpp,v 1.2 1999-09-21 17:04:27 dengert Exp $ */
    22/*
    33 * Win32 Window graphics apis for OS/2
     
    55 *
    66 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
     7 * Copyright 1999 Daniela Engert (dani@ngrt.de)
    78 *
    89 *
     
    3334    return 0;
    3435    }
    35 // !! there is no HDC to paint on !!!    window->MsgEraseBackGround(hdc);
     36// !! there is no HDC to paint on !!!    window->MsgEraseBackGround(hdc);
    3637#ifdef OPEN32_GDI
    3738    hdc = O32_BeginPaint(window->getOS2WindowHandle(),lps);
     
    118119   window = Win32BaseWindow::GetWindowFromHandle(hwnd);
    119120   if(!window) {
    120         dprintf(("GetWindowDC, window %x not found", hwnd));
    121         return 0;
     121        dprintf(("GetWindowDC, window %x not found", hwnd));
     122        return 0;
    122123   }
    123124   dprintf(("GetWindowDC %x", hwnd));
Note: See TracChangeset for help on using the changeset viewer.