Changeset 5150 for trunk/src


Ignore:
Timestamp:
Feb 17, 2001, 6:11:17 PM (25 years ago)
Author:
sandervl
Message:

WM_ADJUSTWINDOWPOS bugfix (if app changes size/position)

File:
1 edited

Legend:

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

    r5146 r5150  
    1 /* $Id: pmwindow.cpp,v 1.114 2001-02-17 14:49:26 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.115 2001-02-17 17:11:17 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    343343            (wp.x != wpOld.x) || (wp.y != wpOld.y) || (wp.cx != wpOld.cx) || (wp.cy != wpOld.cy) || (wp.flags != wpOld.flags))
    344344        {
     345            ULONG flags = pswp->fl;      //make a backup copy; OSLibMapWINDOWPOStoSWP will modify it
     346
    345347            dprintf(("OS2: WM_ADJUSTWINDOWPOS, app changed windowpos struct"));
    346348            dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
    347349
    348350            if(win32wnd->getParent()) {
    349                 OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, win32wnd->getParent()->getWindowHeight(),
    350                                        win32wnd->getParent()->getClientRectPtr()->left,
    351                                        win32wnd->getParent()->getClientRectPtr()->top,
    352                                        hwnd);
     351                  OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, win32wnd->getParent()->getWindowHeight(),
     352                                         win32wnd->getParent()->getClientRectPtr()->left,
     353                                         win32wnd->getParent()->getClientRectPtr()->top,
     354                                         hwnd);
    353355            }
    354356            else  OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, OSLibQueryScreenHeight(), 0, 0, hwnd);
    355357
    356358            dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
     359
     360            //OSLibMapWINDOWPOStoSWP can add flags, but we must not let it remove flags!
     361            if(pswp->fl & SWP_SIZE)
     362                flags |= SWP_SIZE;
     363
     364            if(pswp->fl & SWP_MOVE)
     365                flags |= SWP_MOVE;
     366
     367            pswp->fl = flags;   //restore flags
     368
    357369            pswp->fl |= SWP_NOADJUST;
    358370            pswp->hwndInsertBehind = hwndAfter;
Note: See TracChangeset for help on using the changeset viewer.