Ignore:
Timestamp:
Dec 5, 1999, 1:31:50 AM (26 years ago)
Author:
sandervl
Message:

Rewrote some message apis + WM_WINDOWPOSCHANGED fix

File:
1 edited

Legend:

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

    r1922 r1971  
    1 /* $Id: pmframe.cpp,v 1.25 1999-12-01 18:23:28 cbratschi Exp $ */
     1/* $Id: pmframe.cpp,v 1.26 1999-12-05 00:31:47 sandervl Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    321321      LONG      yDelta = pswp->cy - swpOld.cy;
    322322      LONG      xDelta = pswp->cx - swpOld.cx;
     323      LONG      clientHeight;
    323324
    324325        dprintf(("PMFRAME: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
     326
     327        //Save height so WM_WINDOWPOSCHANGED handler in pmwindow.cpp
     328        //(for client) doesn't overwrite the client rectangle (breaks ydelta calculation)
     329        clientHeight = win32wnd->getWindowHeight();
    325330
    326331        RestoreOS2TIB();
     
    329334
    330335        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0)
    331             goto PosChangedEnd;
    332 
    333         if(!win32wnd->CanReceiveSizeMsgs())
    334336            goto PosChangedEnd;
    335337
     
    345347
    346348        //delta is difference between old and new client height
    347         yDelta = swpOld.cy - win32wnd->getWindowHeight();
     349        yDelta = swpOld.cy - clientHeight;
    348350
    349351        win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);
    350352        win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);
     353
     354        if(!win32wnd->CanReceiveSizeMsgs())
     355            goto PosChangedEnd;
    351356
    352357        wp.hwnd = win32wnd->getWindowHandle();
     
    385390                    swp[i].fl &= ~(SWP_NOREDRAW);
    386391                }
    387                 //else child window with the same start coorindates as the client area
     392                //else child window with the same start coordinates as the client area
    388393                //The app should resize it.
    389394
Note: See TracChangeset for help on using the changeset viewer.