Ignore:
Timestamp:
Jan 5, 2000, 10:25:08 PM (26 years ago)
Author:
cbratschi
Message:

single frame works now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/pmframe.cpp

    r2309 r2335  
    1 /* $Id: pmframe.cpp,v 1.4 2000-01-03 20:53:50 cbratschi Exp $ */
     1/* $Id: pmframe.cpp,v 1.5 2000-01-05 21:25:05 cbratschi Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    262262      PSWP pswp = (PSWP)mp1,swpClient;
    263263      RECTL *client = (PRECTL)mp2,rect;
     264      RECT winRect;
    264265      INT ccount;
    265266
     
    269270      ccount = (INT)OldFrameProc(hwnd,msg,mp1,mp2);
    270271      SetWin32TIB();
     272      dprintf(("Frame size: %d %d",win32wnd->getWindowWidth(),win32wnd->getWindowHeight()));
     273      win32wnd->MsgFormatFrame();
     274      //CB: todo: use result for WM_CALCVALIDRECTS
    271275      mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect);
    272276      WinMapWindowPoints(WinQueryWindow(hwnd,QW_PARENT),hwnd,(PPOINTL)&rect,2);
    273 //dprintf(("CB: %d %d %d %d",rect.xLeft,rect.yBottom,rect.xRight,rect.yTop));
     277      dprintf(("New client position: %d %d %d %d",rect.xLeft,rect.yBottom,rect.xRight,rect.yTop));
    274278      swpClient = &pswp[ccount-1];
    275279      swpClient->x = rect.xLeft;
     
    339343      else
    340344      {
    341         dprintf(("USER32: WM_HITTEST %x (%d,%d)",hwnd,(*(POINTS *)&mp1).x,(*(POINTS *)&mp1).y));
     345        dprintf(("PMFRAME: WM_HITTEST %x (%d,%d)",hwnd,(*(POINTS *)&mp1).x,(*(POINTS *)&mp1).y));
    342346
    343347        //CB: WinWindowFromPoint: PM sends WM_HITTEST -> loop -> stack overflow
     
    351355
    352356    case WM_PAINT:
     357        //CB: todo: call defframe if minimized
    353358        dprintf(("PMFRAME: WM_PAINT"));
    354359        if (win32wnd->IsWindowCreated())
     
    356361        goto RunDefWndProc;
    357362
    358 //CB: not yet checked
     363    case WM_SIZE:
     364        dprintf(("PMFRAME: WM_SIZE"));
     365        goto RunDefFrameProc;
     366
    359367    case WM_ADJUSTWINDOWPOS:
    360368    {
     
    381389            goto RunDefFrameProc;
    382390
    383         if(!win32wnd->CanReceiveSizeMsgs()) {
    384 //SvL: Doing this breaks button.exe, header4(a).exe & style.exe
    385 //            goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken
    386             break;
    387         }
     391        if(!win32wnd->CanReceiveSizeMsgs())
     392           break;
    388393
    389394        WinQueryWindowPos(hwnd, &swpOld);
     
    419424            pswp->hwnd = hwnd;
    420425
    421 //            goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken
    422426            RestoreOS2TIB();
    423427            return (MRESULT)0xf;
    424428        }
    425         goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken
     429        goto RunDefFrameProc;
    426430    }
    427431
     
    434438
    435439        dprintf(("PMFRAME: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
    436 
    437         RestoreOS2TIB();
    438         rc = OldFrameProc(hwnd,msg,mp1,mp2);
    439         SetWin32TIB();
    440440
    441441        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0)
     
    453453
    454454        win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);
    455         win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);
    456 
     455dprintf(("CB: %d %d %d %d",wp.x,wp.y,wp.x+wp.cx,wp.y+wp.cy));
    457456        if(win32wnd->CanReceiveSizeMsgs())
    458457          win32wnd->MsgPosChanged((LPARAM)&wp);
    459458
    460459PosChangedEnd:
     460        //calls WM_FORMATFRAME if SWP_SIZE is set
     461        RestoreOS2TIB();
     462        rc = OldFrameProc(hwnd,msg,mp1,mp2);
     463        SetWin32TIB();
     464
    461465        RestoreOS2TIB();
    462466        return rc;
Note: See TracChangeset for help on using the changeset viewer.