Ignore:
Timestamp:
Jan 16, 2000, 7:17:13 PM (26 years ago)
Author:
cbratschi
Message:

menu and frame changes

File:
1 edited

Legend:

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

    r2435 r2458  
    1 /* $Id: pmframe.cpp,v 1.17 2000-01-14 13:16:57 sandervl Exp $ */
     1/* $Id: pmframe.cpp,v 1.18 2000-01-16 18:17:11 cbratschi Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    118118      {
    119119        win32wnd->setStyle((win32wnd->getStyle() & ~WS_MINIMIZE_W) | WS_MAXIMIZE_W);
     120
     121        RECT rect;
     122
     123        rect.left = rect.top = rect.right = rect.bottom = 0;
     124        win32wnd->AdjustMaximizedRect(&rect);
     125        swp->x += rect.left;
     126        swp->cx += rect.right-rect.left;
     127        swp->y -= rect.bottom;
     128        swp->cy += rect.bottom-rect.top;
    120129      }
    121130      else if ((swp->fl & SWP_MINIMIZE) == SWP_MINIMIZE)
     
    131140
    132141    case WM_QUERYBORDERSIZE:
    133       goto RunDefFrameProc;
     142    {
     143      PWPOINT size = (PWPOINT)mp1;
     144
     145      size->x = 0;
     146      size->y = 0;
     147      RestoreOS2TIB();
     148      return (MRESULT)TRUE;
     149    }
    134150
    135151    case WM_BUTTON1DOWN:
     
    212228        if(!win32wnd->CanReceiveSizeMsgs())
    213229           break;
    214 //CB: todo: adjust maximized window rect (how does WINE it?)
     230
    215231        WinQueryWindowPos(hwnd, &swpOld);
    216232        if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
     
    263279        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0)
    264280        {
    265                 goto RunDefFrameProc;
     281                goto RunDefFrameProc;
    266282        }
    267283
     
    276292        OSLibMapSWPtoWINDOWPOSFrame(pswp, &wp, &swpOld, hParent, hwnd);
    277293
    278         if(pswp->fl & SWP_ACTIVATE)
    279         {
     294        if(pswp->fl & SWP_ACTIVATE)
     295        {
    280296             WinSendMsg(hwnd, WM_ACTIVATE, (MPARAM)TRUE, (MPARAM)hwnd);
    281         }
    282 
    283         if(pswp->fl & (SWP_MOVE | SWP_SIZE))
    284         {
    285           //Note: Also updates the new window rectangle
     297        }
     298
     299        if((pswp->fl & (SWP_MOVE | SWP_SIZE)) && !(win32wnd->getStyle() & WS_MINIMIZE_W))
     300        {
     301          //Note: Also updates the new window rectangle
    286302          win32wnd->MsgFormatFrame(&wp);
    287303
     
    325341            {
    326342              WinInvalidateRect(hwnd,NULL,TRUE);
    327             } 
     343            }
    328344            else
    329345            {
     
    360376            }
    361377          }
    362         } 
     378        }
    363379        else
    364380        {
     
    378394
    379395    case WM_ERASEBACKGROUND:
    380         break;
     396        break;
    381397
    382398    case WM_CALCVALIDRECTS:
     
    453469  SWP swpClient = {0};
    454470
    455         rectOld = *win32wnd->getClientRectPtr();
     471        rectOld = *win32wnd->getClientRectPtr();
    456472        win32wnd->MsgFormatFrame(NULL);
    457473        rectNew = *win32wnd->getClientRectPtr();
    458474        if(WinEqualRect(0, (PRECTL)&rectOld, (PRECTL)&rectNew) == 1) {
    459                 WinInvalidateRect(win32wnd->getOS2FrameWindowHandle(), NULL, FALSE);
    460                 return;
    461         }
     475                WinInvalidateRect(win32wnd->getOS2FrameWindowHandle(), NULL, FALSE);
     476                return;
     477        }
    462478        //CB: todo: use result for WM_CALCVALIDRECTS
    463479        mapWin32ToOS2Rect(win32wnd->getOS2FrameWindowHandle(), win32wnd->getClientRectPtr(), (PRECTLOS2)&rect);
Note: See TracChangeset for help on using the changeset viewer.