Changeset 5164 for trunk/src


Ignore:
Timestamp:
Feb 18, 2001, 3:18:39 PM (25 years ago)
Author:
sandervl
Message:

workaround for window origin changes

Location:
trunk/src/user32
Files:
5 edited

Legend:

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

    r5152 r5164  
    1 /* $Id: dc.cpp,v 1.85 2001-02-17 19:25:08 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.86 2001-02-18 14:18:38 sandervl Exp $ */
    22
    33/*
     
    348348   pHps->isClient = FALSE;
    349349
    350 #ifdef DEBUG
    351    GreGetDCOrigin(pHps->hps, &point);
    352 #endif
     350   dprintfOrigin(pHps->hps);
    353351
    354352   if(pHps->isClientArea)
     
    456454//******************************************************************************
    457455//******************************************************************************
     456void selectClientArea(Win32BaseWindow *wnd, HDC hdc)
     457{
     458  pDCData pHps = (pDCData)GpiQueryDCData (wnd->getOwnDC());
     459
     460  if (pHps != NULLHANDLE)
     461      selectClientArea(wnd, pHps);
     462}
     463//******************************************************************************
     464//******************************************************************************
    458465LONG clientHeight(Win32BaseWindow *wnd, HWND hwnd, pDCData pHps)
    459466{
     
    765772   else lpps->fErase = TRUE;
    766773
    767 #ifdef DEBUG
    768    POINTL point;
    769    GreGetDCOrigin(pHps->hps, &point);
    770    dprintf(("dc origin (%d,%d)", point.x, point.y));
    771 #endif
     774   dprintfOrigin(pHps->hps);
    772775
    773776   lpps->hdc    = (HDC)pHps->hps;
     
    809812   if (pHps && (pHps->hdcType == TYPE_3))
    810813   {
     814        dprintfOrigin(pHps->hps);
     815
    811816        GpiSetClipRegion(pHps->hps, wnd->GetClipRegion(), &hrgnOld);
    812817        wnd->SetClipRegion(0);
     
    17911796//******************************************************************************
    17921797//******************************************************************************
     1798#ifdef DEBUG
     1799void dprintfOrigin(HDC hdc)
     1800{
     1801   POINTL point;
     1802
     1803    pDCData  pHps = (pDCData)GpiQueryDCData((HPS)hdc);
     1804    if(!pHps)
     1805    {
     1806        return;
     1807    }
     1808
     1809    GreGetDCOrigin(pHps->hps, &point);
     1810    dprintf(("HDC %x origin (%d,%d) org (%d,%d)", hdc, point.x, point.y, pHps->ptlOrigin.x, pHps->ptlOrigin.y));
     1811}
     1812#endif
     1813//******************************************************************************
     1814//******************************************************************************
  • trunk/src/user32/dc.h

    r3722 r5164  
    1 /* $Id: dc.h,v 1.15 2000-06-17 09:45:02 sandervl Exp $ */
     1/* $Id: dc.h,v 1.16 2001-02-18 14:18:38 sandervl Exp $ */
    22/*
    33 * public dc functions
     
    1717extern void releaseOwnDC (HDC hps);
    1818
     19void selectClientArea(Win32BaseWindow *wnd, HDC hdc);
     20
    1921BOOL GetOS2UpdateRect(Win32BaseWindow *window,LPRECT pRect);
     22
     23#ifdef DEBUG
     24void dprintfOrigin(HDC hdc);
     25#else
     26#define dprintfOrigin(a)
     27#endif
    2028
    2129#ifdef INCLUDED_BY_DC
  • trunk/src/user32/pmwindow.cpp

    r5150 r5164  
    1 /* $Id: pmwindow.cpp,v 1.115 2001-02-17 17:11:17 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.116 2001-02-18 14:18:38 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    286286        dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
    287287
     288        if(win32wnd->getParent() && win32wnd->getParent()->isOwnDC()) {
     289            dprintfOrigin(win32wnd->getParent()->getOwnDC());
     290            selectClientArea(win32wnd->getParent(), win32wnd->getParent()->getOwnDC());
     291        }
     292
    288293        if(pswp->fl & SWP_NOADJUST) {
    289294            //ignore weird messages (TODO: why are they sent?)
     
    596601                win32wnd->setComingToTop(FALSE);
    597602                break;
     603        }
     604//test
     605        if(win32wnd->isOwnDC()) {
     606                dprintfOrigin(win32wnd->getOwnDC());
     607                selectClientArea(win32wnd, win32wnd->getOwnDC());
     608        }
     609//test
     610        goto RunDefWndProc;
     611
     612    case WM_VRNDISABLED:
     613        dprintf(("OS2: WM_VRNDISABLED %x %x %x", win32wnd->getWindowHandle(), mp1, mp2));
     614        if(win32wnd->isOwnDC()) {
     615                dprintfOrigin(win32wnd->getOwnDC());
    598616        }
    599617        goto RunDefWndProc;
  • trunk/src/user32/user32.cpp

    r4848 r5164  
    1 /* $Id: user32.cpp,v 1.90 2000-12-29 18:39:59 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.91 2001-02-18 14:18:39 sandervl Exp $ */
    22
    33/*
     
    15991599int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
    16001600{
    1601     dprintf(("USER32:  FillRect (%d,%d)(%d,%d) brush %X\n", lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
     1601    dprintf(("USER32:  FillRect %x (%d,%d)(%d,%d) brush %X\n", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
    16021602    return O32_FillRect(hDC,lprc,hbr);
    16031603}
  • trunk/src/user32/win32wbase.cpp

    r5146 r5164  
    1 /* $Id: win32wbase.cpp,v 1.235 2001-02-17 14:49:26 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.236 2001-02-18 14:18:39 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    24112411    }
    24122412
     2413//testestest
     2414    if(getParent() && getParent()->isOwnDC()) {
     2415        dprintfOrigin(getParent()->getOwnDC());
     2416        selectClientArea(getParent(), getParent()->getOwnDC());
     2417    }
     2418//testestest
     2419
    24132420    if((fuFlags & SWP_FRAMECHANGED) && (fuFlags & (SWP_NOMOVE | SWP_NOSIZE) == (SWP_NOMOVE | SWP_NOSIZE)))
    24142421    {
Note: See TracChangeset for help on using the changeset viewer.