Changeset 5655


Ignore:
Timestamp:
May 4, 2001, 7:02:52 PM (24 years ago)
Author:
sandervl
Message:

FrameTrackFrame & nccalcsize bugfixes

Location:
trunk/src/user32
Files:
3 edited

Legend:

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

    r5606 r5655  
    1 /* $Id: dc.cpp,v 1.97 2001-04-27 17:36:36 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.98 2001-05-04 17:02:50 sandervl Exp $ */
    22
    33/*
     
    491491
    492492        hrgnParentClip = GreCreateRectRegion(pHps->hps, &rectWindowOS2, 1);
     493#ifdef DEBUG
     494        dprintf(("Combining client & parent client regions"));
     495        dprintfRegion1(pHps->hps, window->getWindowHandle(), hrgnParentClip);
     496        dprintfRegion1(pHps->hps, window->getWindowHandle(), hrgnRect);
     497#endif
     498
    493499        GreCombineRegion(pHps->hps, hrgnRect, hrgnParentClip, hrgnRect, CRGN_AND);
    494500        GreDestroyRegion(pHps->hps, hrgnParentClip);
  • trunk/src/user32/pmwindow.cpp

    r5606 r5655  
    1 /* $Id: pmwindow.cpp,v 1.123 2001-04-27 17:36:37 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.124 2001-05-04 17:02:51 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    13751375  HPS       hpsTrack;
    13761376  LONG      parentHeight, parentWidth;
     1377  LONG      clientOrgX, clientOrgY;
    13771378
    13781379    dprintf(("FrameTrackFrame: %x %x", win32wnd->getWindowHandle(), flags));
     
    13901391        hwndTracking = win32wnd->getParent()->getOS2WindowHandle();
    13911392        hpsTrack     = WinGetPS(hwndTracking);
     1393        clientOrgX   = win32wnd->getParent()->getClientRectPtr()->left;
     1394        clientOrgY   = win32wnd->getParent()->getClientRectPtr()->top;
    13921395    }
    13931396    else {
     
    13961399        hwndTracking = HWND_DESKTOP;
    13971400        hpsTrack     = NULL;
     1401        clientOrgX   = 0;
     1402        clientOrgY   = 0;
    13981403    }
    13991404
    14001405    mapWin32ToOS2Rect(parentHeight, pWindowRect, (PRECTLOS2)&track.rclTrack);
     1406    track.rclTrack.xLeft += clientOrgX;
     1407    track.rclTrack.yTop  -= clientOrgY;
     1408    rcl = track.rclTrack;
    14011409    WinQueryWindowRect(hwndTracking, &track.rclBoundary);
    14021410
     
    14231431            }
    14241432            else {
    1425               SetWindowPos(win32wnd->getWindowHandle(), 0, track.rclTrack.xLeft,
    1426                            parentHeight - track.rclTrack.yTop,
    1427                            track.rclTrack.xRight - track.rclTrack.xLeft,
    1428                            track.rclTrack.yTop - track.rclTrack.yBottom,
    1429                            SWP_NOACTIVATE_W | SWP_NOZORDER_W | SWP_NOACTIVATE_W);
    1430 //                WinSetWindowPos(win32wnd->getOS2WindowHandle(),
    1431 //                                0, track.rclTrack.xLeft, track.rclTrack.yBottom,
    1432 //                               track.rclTrack.xRight - track.rclTrack.xLeft,
    1433 //                                track.rclTrack.yTop - track.rclTrack.yBottom,
    1434 //                                SWP_SIZE|SWP_MOVE);
     1433////              SetWindowPos(win32wnd->getWindowHandle(), 0, track.rclTrack.xLeft,
     1434////                           parentHeight - track.rclTrack.yTop,
     1435////                           track.rclTrack.xRight - track.rclTrack.xLeft,
     1436////                           track.rclTrack.yTop - track.rclTrack.yBottom,
     1437////                           SWP_NOACTIVATE_W | SWP_NOZORDER_W | SWP_NOACTIVATE_W);
     1438                WinSetWindowPos(win32wnd->getOS2WindowHandle(),
     1439                                0, track.rclTrack.xLeft, track.rclTrack.yBottom,
     1440                                track.rclTrack.xRight - track.rclTrack.xLeft,
     1441                                track.rclTrack.yTop - track.rclTrack.yBottom,
     1442                                SWP_SIZE|SWP_MOVE);
    14351443            }
    14361444        }
  • trunk/src/user32/win32wbasepos.cpp

    r5258 r5655  
    1 /* $Id: win32wbasepos.cpp,v 1.22 2001-02-23 14:52:42 sandervl Exp $ */
     1/* $Id: win32wbasepos.cpp,v 1.23 2001-05-04 17:02:52 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (nonclient/position methods)
     
    153153
    154154   /* Send WM_NCCALCSIZE message to get new client area */
    155    if((winpos->flags & (SWP_FRAMECHANGED | SWP_NOSIZE)) != SWP_NOSIZE )
     155   params.rgrc[0] = *newWindowRect;
     156   if(calcValidRect)
    156157   {
    157         params.rgrc[0] = *newWindowRect;
    158         if(calcValidRect)
    159         {
    160             winposCopy = *winpos;
    161             params.rgrc[1] = *oldWindowRect;
    162             params.rgrc[2] = *oldClientRect;
    163             //client rectangel must be in parent coordinates
    164             OffsetRect(&params.rgrc[2], rectWindow.left, rectWindow.top);
    165 
    166             params.lppos = &winposCopy;
    167         }
    168         result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, (LPARAM)&params );
    169 
    170         /* If the application send back garbage, ignore it */
    171         if(params.rgrc[0].left <= params.rgrc[0].right && params.rgrc[0].top <= params.rgrc[0].bottom)
    172         {
    173             *newClientRect = params.rgrc[0];
    174             //client rectangle now in parent coordinates; convert to 'frame' coordinates
    175             OffsetRect(newClientRect, -rectWindow.left, -rectWindow.top);
    176         }
    177 
    178         /* FIXME: WVR_ALIGNxxx */
    179         if(newClientRect->left != rectClient.left || newClientRect->top  != rectClient.top)
    180            winpos->flags &= ~SWP_NOCLIENTMOVE;
    181 
    182         if((newClientRect->right - newClientRect->left != rectClient.right - rectClient.left) ||
    183            (newClientRect->bottom - newClientRect->top != rectClient.bottom - rectClient.top))
    184              winpos->flags &= ~SWP_NOCLIENTSIZE;
    185 
     158        winposCopy = *winpos;
     159        params.rgrc[1] = *oldWindowRect;
     160        params.rgrc[2] = *oldClientRect;
     161        //client rectangel must be in parent coordinates
     162        OffsetRect(&params.rgrc[2], rectWindow.left, rectWindow.top);
     163
     164        params.lppos = &winposCopy;
    186165   }
    187    else
    188    if(!(winpos->flags & SWP_NOMOVE) &&
    189        (newClientRect->left != rectClient.left || newClientRect->top != rectClient.top)) {
    190             winpos->flags &= ~SWP_NOCLIENTMOVE;
     166   result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, (LPARAM)&params );
     167
     168   /* If the application send back garbage, ignore it */
     169   if(params.rgrc[0].left <= params.rgrc[0].right && params.rgrc[0].top <= params.rgrc[0].bottom)
     170   {
     171        *newClientRect = params.rgrc[0];
     172        //client rectangle now in parent coordinates; convert to 'frame' coordinates
     173        OffsetRect(newClientRect, -rectWindow.left, -rectWindow.top);
    191174   }
     175
     176   /* FIXME: WVR_ALIGNxxx */
     177   if(newClientRect->left != rectClient.left || newClientRect->top  != rectClient.top)
     178        winpos->flags &= ~SWP_NOCLIENTMOVE;
     179
     180   if((newClientRect->right - newClientRect->left != rectClient.right - rectClient.left) ||
     181       (newClientRect->bottom - newClientRect->top != rectClient.bottom - rectClient.top))
     182        winpos->flags &= ~SWP_NOCLIENTSIZE;
     183
    192184   return result;
    193185}
Note: See TracChangeset for help on using the changeset viewer.