Changeset 2340 for trunk/src


Ignore:
Timestamp:
Jan 6, 2000, 6:05:52 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

Location:
trunk/src/user32/new
Files:
3 edited

Legend:

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

    r2335 r2340  
    1 /* $Id: oslibgdi.cpp,v 1.10 2000-01-05 21:25:03 cbratschi Exp $ */
     1/* $Id: oslibgdi.cpp,v 1.11 2000-01-06 17:05:52 cbratschi Exp $ */
    22/*
    33 * Window GDI wrapper functions for OS/2
     
    437437  WinMapWindowPoints((os2From == OSLIB_HWND_DESKTOP) ? HWND_DESKTOP:os2From,(os2To == OSLIB_HWND_DESKTOP) ? HWND_DESKTOP:os2To,(PPOINTL)&rect,2);
    438438  mapOS2ToWin32Rect(os2To,(PRECTLOS2)&rect,rectWin32);
     439
     440  return TRUE;
    439441}
    440442//******************************************************************************
  • trunk/src/user32/new/pmframe.cpp

    r2335 r2340  
    1 /* $Id: pmframe.cpp,v 1.5 2000-01-05 21:25:05 cbratschi Exp $ */
     1/* $Id: pmframe.cpp,v 1.6 2000-01-06 17:05:52 cbratschi Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    302302    case WM_BUTTON3UP:
    303303    case WM_BUTTON3DBLCLK:
     304    {
     305        SWP swp;
     306
     307        WinQueryWindowPos(hwnd,&swp);
     308        if ((swp.fl & SWP_MINIMIZE) == SWP_MINIMIZE)
     309          goto RunDefFrameProc;
    304310        if (win32wnd->IsWindowCreated())
    305311        {
     
    308314        }
    309315        return (MRESULT)TRUE;
     316    }
    310317
    311318    case WM_BUTTON2MOTIONSTART:
     
    323330    case WM_MOUSEMOVE:
    324331    {
     332        SWP swp;
     333
     334        WinQueryWindowPos(hwnd,&swp);
     335        if ((swp.fl & SWP_MINIMIZE) == SWP_MINIMIZE)
     336          goto RunDefFrameProc;
    325337        //OS/2 Window coordinates -> Win32 Window coordinates
    326338        if (win32wnd->IsWindowCreated())
     
    333345    {
    334346      DWORD res;
     347      SWP swp;
     348
     349      WinQueryWindowPos(hwnd,&swp);
     350      if ((swp.fl & SWP_MINIMIZE) == SWP_MINIMIZE)
     351        goto RunDefFrameProc;
    335352
    336353      // Only send this message if the window is enabled
     
    355372
    356373    case WM_PAINT:
    357         //CB: todo: call defframe if minimized
     374    {
     375        SWP swp;
     376
     377        WinQueryWindowPos(hwnd,&swp);
     378        if ((swp.fl & SWP_MINIMIZE) == SWP_MINIMIZE)
     379          goto RunDefFrameProc;
    358380        dprintf(("PMFRAME: WM_PAINT"));
    359381        if (win32wnd->IsWindowCreated())
    360382          win32wnd->MsgNCPaint();
    361383        goto RunDefWndProc;
     384    }
    362385
    363386    case WM_SIZE:
     
    453476
    454477        win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);
    455 dprintf(("CB: %d %d %d %d",wp.x,wp.y,wp.x+wp.cx,wp.y+wp.cy));
     478
    456479        if(win32wnd->CanReceiveSizeMsgs())
    457480          win32wnd->MsgPosChanged((LPARAM)&wp);
     
    472495      UINT res = CVR_ALIGNLEFT | CVR_ALIGNTOP;
    473496
    474 //CB: todo: use WM_NCCALCSIZE
     497//CB: todo: use WM_NCCALCSIZE result
    475498      if (win32wnd->getWindowClass())
    476499      {
     
    483506      } else res |= CVR_REDRAW;
    484507
    485       //CB: PM updates window frame (and unfortunately all other frame controls)
     508      //CB: PM sets client window position
    486509      RestoreOS2TIB();
    487510      OldFrameProc(hwnd,msg,mp1,mp2);
  • trunk/src/user32/new/win32wbase.cpp

    r2335 r2340  
    1 /* $Id: win32wbase.cpp,v 1.22 2000-01-05 21:25:07 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.23 2000-01-06 17:05:52 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    700700  rectWindow.bottom = cs->y+cs->cy;
    701701  rectClient = rectWindow; //dummy client rect
    702   MapWindowPoints(getParent() ? getParent()->getWindowHandle():OSLIB_HWND_DESKTOP,0,(PPOINT)&rectWindow,2);
     702  if (getParent()) MapWindowPoints(getParent()->getWindowHandle(),0,(PPOINT)&rectWindow,2);
    703703  /* Send the WM_CREATE message
    704704   * Perhaps we shouldn't allow width/height changes as well.
     
    721721        rectWindow.bottom = cs->y+cs->cy;
    722722        rectClient = rectWindow;
    723         MapWindowPoints(getParent() ? getParent()->getWindowHandle():OSLIB_HWND_DESKTOP,0,(PPOINT)&rectWindow,2);
     723        if (getParent()) MapWindowPoints(getParent()->getWindowHandle(),0,(PPOINT)&rectWindow,2);
    724724        OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top);
    725725        //set the window size and update the client
    726726        rect = rectWindow;
    727         MapWindowPoints(0,getParent() ? getParent()->getWindowHandle():OSLIB_HWND_DESKTOP,(PPOINT)&rect,2);
     727        if (getParent()) MapWindowPoints(0,getParent()->getWindowHandle(),(PPOINT)&rect,2);
    728728        SetWindowPos(hwndLinkAfter,rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,SWP_NOACTIVATE | SWP_NOREDRAW | SWP_FRAMECHANGED);
    729729        fNoSizeMsg = FALSE;
     
    11181118  wndPos.hwndInsertAfter = 0;
    11191119  rect = rectWindow;
    1120   MapWindowPoints(Win32Hwnd,(getParent()) ? getParent()->getWindowHandle():HWND_DESKTOP,(PPOINT)&rect,2);
     1120  if (getParent()) MapWindowPoints(0,getParent()->getWindowHandle(),(PPOINT)&rect,2);
    11211121  wndPos.x = rect.left;
    11221122  wndPos.y = rect.top;
     
    15531553
    15541554  clientRect = &((NCCALCSIZE_PARAMS*)winRect)->rgrc[2];
    1555   clientRect->left = 0;
    1556   clientRect->right = rectWindow.right-rectWindow.left;
    1557   clientRect->top = 0;
    1558   clientRect->bottom = rectWindow.bottom-rectWindow.top;
    1559   mapWin32Rect(OS2HwndFrame,getParent() ? getParent()->getWindowHandle():OSLIB_HWND_DESKTOP,clientRect);
     1555  *clientRect = rectWindow;
     1556  if (getParent()) MapWindowPoints(0,getParent()->getOS2WindowHandle(),(PPOINT)clientRect,2);
    15601557
    15611558  if(!(dwStyle & WS_MINIMIZE))
Note: See TracChangeset for help on using the changeset viewer.