Ignore:
Timestamp:
Aug 27, 1999, 7:50:57 PM (26 years ago)
Author:
dengert
Message:

window creation, positioning, sizing

File:
1 edited

Legend:

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

    r693 r715  
    1 /* $Id: pmwindow.cpp,v 1.21 1999-08-25 15:08:50 dengert Exp $ */
     1/* $Id: pmwindow.cpp,v 1.22 1999-08-27 17:50:56 dengert Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    179179      WINDOWPOS wp;
    180180      ULONG    parentHeight = 0;
     181      HWND      hParent = NULLHANDLE, hFrame = NULLHANDLE;
    181182
    182183        dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
    183184
     185        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
     186
    184187        WinQueryWindowPos(hwnd, &swpOld);
    185188
    186189        if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
    187             parentHeight = (win32wnd->isChild()) ?
    188                 OSLibGetWindowHeight(win32wnd->getParent()->getOS2WindowHandle())
    189               : OSLibQueryScreenHeight();
    190         }
    191         OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, parentHeight);
     190            if (win32wnd->isChild())
     191                hParent = win32wnd->getParent()->getOS2WindowHandle();
     192            else
     193                hFrame = win32wnd->getOS2FrameWindowHandle();
     194        }
     195        OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame);
     196
    192197        wp.hwnd = win32wnd->getWindowHandle();
    193198        if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
     
    202207    case WM_WINDOWPOSCHANGED:
    203208    {
    204       PSWP      pswp = (PSWP)mp1;
     209      PSWP      pswp  = (PSWP)mp1;
     210      PSWP      pswpo = pswp + 1;
    205211      WINDOWPOS wp;
    206212      ULONG     parentHeight = 0;
     213      HWND      hParent = NULLHANDLE, hFrame = NULLHANDLE;
    207214
    208215        dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
     216
     217        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
     218
    209219        if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
    210             parentHeight = (win32wnd->isChild()) ?
    211                 OSLibGetWindowHeight(win32wnd->getParent()->getOS2WindowHandle())
    212               : OSLibQueryScreenHeight();
    213         }
    214         OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswp+1, parentHeight);
     220            if (win32wnd->isChild())
     221                hParent = win32wnd->getParent()->getOS2WindowHandle();
     222            else
     223                hFrame = win32wnd->getOS2FrameWindowHandle();
     224        }
     225        OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswpo, hParent, hFrame);
     226
     227        win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);
     228        win32wnd->setClientRect(pswpo->x, pswpo->y, pswpo->x + pswpo->cx, pswpo->y + pswpo->cy);
     229
    215230        wp.hwnd = win32wnd->getWindowHandle();
    216231        if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
Note: See TracChangeset for help on using the changeset viewer.