Changeset 4628 for trunk/src/user32


Ignore:
Timestamp:
Nov 19, 2000, 12:52:41 PM (25 years ago)
Author:
sandervl
Message:

SetWindowPos fixes for SWP_FRAMECHANGED

Location:
trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibgdi.h

    r3679 r4628  
    1 /* $Id: oslibgdi.h,v 1.7 2000-06-08 18:10:10 sandervl Exp $ */
     1/* $Id: oslibgdi.h,v 1.8 2000-11-19 11:52:39 sandervl Exp $ */
    22/*
    33 * Window GDI wrapper functions for OS/2
     
    112112INT  mapOS2ToWin32ChildOrigin(INT parentH,INT parentPosY,INT childH);
    113113
     114#define RECT_WIDTH(a)   ((a).right - (a).left)
     115#define RECT_HEIGHT(a)  ((a).bottom - (a).top)
     116
    114117#endif //__OSLIBGDI_H__
  • trunk/src/user32/win32wbase.cpp

    r4606 r4628  
    1 /* $Id: win32wbase.cpp,v 1.222 2000-11-17 09:56:54 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.223 2000-11-19 11:52:40 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    23132313        if(fuFlags & SWP_FRAMECHANGED)
    23142314        {
    2315             MsgFormatFrame(NULL);
    2316             UnionRect(&oldClientRect, &oldClientRect, &rectClient);
    2317             OffsetRect(&oldClientRect, -rectClient.left, -rectClient.top);
    2318             InvalidateRect(getWindowHandle(), &oldClientRect, TRUE);
     2315            NotifyFrameChanged(&wpos, &oldClientRect);
    23192316        }
    23202317        return TRUE;
     
    23612358    if((fuFlags & SWP_FRAMECHANGED) && (fuFlags & (SWP_NOMOVE | SWP_NOSIZE) == (SWP_NOMOVE | SWP_NOSIZE)))
    23622359    {
    2363         MsgFormatFrame(NULL);
    2364         UnionRect(&oldClientRect, &oldClientRect, &rectClient);
    2365         OffsetRect(&oldClientRect, -rectClient.left, -rectClient.top);
    2366         InvalidateRect(getWindowHandle(), &oldClientRect, TRUE);
     2360            NotifyFrameChanged(&wpos, &oldClientRect);
    23672361    }
    23682362    return (rc);
     2363}
     2364//******************************************************************************
     2365//******************************************************************************
     2366void Win32BaseWindow::NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect)
     2367{
     2368    MsgFormatFrame(NULL);
     2369    if(RECT_WIDTH(rectClient) != RECT_WIDTH(*oldClientRect) ||
     2370       RECT_HEIGHT(rectClient) != RECT_HEIGHT(*oldClientRect))
     2371    {
     2372         wpos->flags &= ~SWP_NOSIZE;
     2373    }
     2374
     2375    WINDOWPOS wpOld = *wpos;
     2376    SendInternalMessageA(WM_WINDOWPOSCHANGING, 0, (LPARAM)wpos);
     2377
     2378    UnionRect(oldClientRect, oldClientRect, &rectClient);
     2379    OffsetRect(oldClientRect, -rectClient.left, -rectClient.top);
     2380    InvalidateRect(getWindowHandle(), oldClientRect, TRUE);
     2381
     2382    if ((wpos->hwndInsertAfter != wpOld.hwndInsertAfter) ||
     2383        (wpos->x != wpOld.x) || (wpos->y != wpOld.y) || (wpos->cx != wpOld.cx) || (wpos->cy != wpOld.cy) || (wpos->flags != wpOld.flags))
     2384    {
     2385         dprintf(("WARNING, NotifyFrameChanged: TODO -> adjust flags!!!!"));
     2386         SetWindowPos(wpos->hwndInsertAfter, wpos->x, wpos->y, wpos->cx, wpos->cy, wpos->flags | SWP_NOSENDCHANGING);
     2387    }
     2388    else SendInternalMessageA(WM_WINDOWPOSCHANGED, 0, (LPARAM)wpos);
    23692389}
    23702390//******************************************************************************
  • trunk/src/user32/win32wbase.h

    r4558 r4628  
    1 /* $Id: win32wbase.h,v 1.100 2000-11-05 18:49:09 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.101 2000-11-19 11:52:41 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    313313        void    Init();
    314314
     315        void    NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect);
     316
    315317        //called in destructor to remove all (if any) window properties
    316318        void    removeWindowProps();
Note: See TracChangeset for help on using the changeset viewer.