Changeset 3783 for trunk/src


Ignore:
Timestamp:
Jul 1, 2000, 11:51:53 AM (25 years ago)
Author:
sandervl
Message:

moving child window when old window smaller than client area & resized

Location:
trunk/src/user32
Files:
2 edited

Legend:

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

    r3773 r3783  
    1 /* $Id: pmwindow.cpp,v 1.96 2000-06-29 12:26:00 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.97 2000-07-01 09:51:52 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    339339                if(pswp->fl & SWP_ACTIVATE)
    340340                {
    341                         WinSendMsg(hwnd, WM_ACTIVATE, (MPARAM)TRUE, (MPARAM)hwnd);
     341                        if(!(WinQueryWindowUShort(hwnd,QWS_FLAGS) & FF_ACTIVE)) {
     342                                WinSendMsg(hwnd, WM_ACTIVATE, (MPARAM)TRUE, (MPARAM)hwnd);
     343                        }
    342344                }
    343345                goto RunDefWndProc;
     
    364366        if(pswp->fl & SWP_ACTIVATE)
    365367        {
    366              WinSendMsg(hwnd, WM_ACTIVATE, (MPARAM)TRUE, (MPARAM)hwnd);
     368             if(!(WinQueryWindowUShort(hwnd,QWS_FLAGS) & FF_ACTIVE)) {
     369                WinSendMsg(hwnd, WM_ACTIVATE, (MPARAM)TRUE, (MPARAM)hwnd);
     370             }
    367371        }
    368372
     
    690694
    691695        rc = WinQueryUpdateRect(hwnd, &rectl);
    692         dprintf(("OS2: WM_PAINT (%d,%d) (%d,%d)", rectl.xLeft, rectl.yBottom, rectl.xRight, rectl.yTop));
     696        dprintf(("OS2: WM_PAINT %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), rectl.xLeft, rectl.yBottom, rectl.xRight, rectl.yTop));
    693697        if(rc && win32wnd->IsWindowCreated() && (rectl.xLeft != rectl.xRight &&
    694698           rectl.yBottom != rectl.yTop))
  • trunk/src/user32/win32wbase.cpp

    r3773 r3783  
    1 /* $Id: win32wbase.cpp,v 1.203 2000-06-29 12:26:01 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.204 2000-07-01 09:51:53 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    11111111  dprintf(("MsgFormatFrame: old client rect (%d,%d)(%d,%d), new client (%d,%d)(%d,%d)", client.left, client.top, client.right, client.bottom, rectClient.left, rectClient.top, rectClient.right, rectClient.bottom));
    11121112  dprintf(("MsgFormatFrame: old window rect (%d,%d)(%d,%d), new window (%d,%d)(%d,%d)", oldWindowRect.left, oldWindowRect.top, oldWindowRect.right, oldWindowRect.bottom, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
     1113
     1114#if 1
     1115//this doesn't always work
     1116//  if(!fNoSizeMsg && (client.left != rectClient.left || client.top != rectClient.top))
     1117  if(!fNoSizeMsg && (oldWindowRect.right - oldWindowRect.left < rectClient.left
     1118                  || oldWindowRect.bottom - oldWindowRect.top < rectClient.top))
     1119  {
     1120   Win32BaseWindow *child = (Win32BaseWindow *)getFirstChild();
     1121
     1122        //client rectangle has moved -> inform children
     1123        dprintf(("MsgFormatFrame -> client rectangle has changed, move children"));
     1124        while(child) {
     1125                child->SetWindowPos(HWND_TOP, child->getClientRectPtr()->left,
     1126                                    child->getClientRectPtr()->top, 0, 0,
     1127                                    SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
     1128                child = (Win32BaseWindow *)child->getNextChild();
     1129        }
     1130  }
     1131#endif
    11131132  return rc;
    11141133}
Note: See TracChangeset for help on using the changeset viewer.