Changeset 1176 for trunk/src


Ignore:
Timestamp:
Oct 8, 1999, 1:21:31 AM (26 years ago)
Author:
sandervl
Message:

SetWindowPos bugfix

Location:
trunk/src/user32
Files:
5 edited

Legend:

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

    r1159 r1176  
    1 /* $Id: oslibwin.cpp,v 1.13 1999-10-07 09:28:00 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.14 1999-10-07 23:21:30 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    629629   pswp->ulReserved1      = 0;
    630630   pswp->ulReserved2      = 0;
     631}
     632//******************************************************************************
     633//******************************************************************************
     634BOOL OSLibWinCalcFrameRect(HWND hwndFrame, RECTLOS2 *pRect, BOOL fClient)
     635{
     636   return WinCalcFrameRect(hwndFrame, (PRECTL)pRect, fClient);
    631637}
    632638//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r1159 r1176  
    1 /* $Id: oslibwin.h,v 1.9 1999-10-07 09:28:01 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.10 1999-10-07 23:21:30 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    210210#define RELATIVE_TO_SCREEN 1
    211211BOOL  OSLibWinQueryWindowRect(HWND hwnd, PRECT pRect, int RelativeTo = RELATIVE_TO_WINDOW);
     212BOOL  OSLibWinCalcFrameRect(HWND hwndFrame, RECTLOS2 *pRect, BOOL fClient);
    212213
    213214#define QWOS_NEXT         0
  • trunk/src/user32/pmwindow.cpp

    r1172 r1176  
    1 /* $Id: pmwindow.cpp,v 1.20 1999-10-07 19:38:27 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.21 1999-10-07 23:21:30 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    149149     (PSZ)WIN32_STDCLASS,               /* Window class name            */
    150150     (PFNWP)Win32WindowProc,            /* Address of window procedure  */
    151      CS_SIZEREDRAW | CS_HITTEST | CS_MOVENOTIFY,
     151//     CS_SIZEREDRAW | CS_HITTEST | CS_MOVENOTIFY,
     152     CS_SIZEREDRAW | CS_HITTEST,
    152153     NROF_WIN32WNDBYTES)) {
    153154        dprintf(("WinRegisterClass Win32BaseWindow failed"));
     
    342343        {
    343344            POINT pt;
    344 #if 1
    345345            if(GetCaretPos (&pt) == TRUE)
    346346            {
     
    348348                SetCaretPos (pt.x, pt.y);
    349349            }
    350 #else
    351             GetCaretPos (&pt);
    352             pt.y -= yDelta;
    353             SetCaretPos (pt.x, pt.y);
    354 #endif
    355350        }
    356351        win32wnd->MsgPosChanged((LPARAM)&wp);
    357352
    358         break;
     353        goto RunDefWndProc;
     354//        break;
    359355    }
    360356
     
    387383        swp.hwnd             = hwnd;
    388384        swp.hwndInsertBehind = NULLHANDLE;
     385        dprintf(("OS2: WM_MOVE %x %x (%d,%d) (%d,%d)", hwnd, swp.fl, swp.x, swp.y, swp.cx, swp.cy));
    389386
    390387        OSLibMapSWPtoWINDOWPOS(&swp, &wp, &swpo, NULLHANDLE, hFrame);
    391 
    392         dprintf(("OS2: WM_MOVE %x %x (%d,%d) (%d,%d)", hwnd, swp.fl, swp.x, swp.y, swp.cx, swp.cy));
    393388
    394389        wp.flags &= ~SWP_NOMOVE_W;
     
    399394        break;
    400395    }
     396
    401397    case WM_SIZE:
    402398    {
  • trunk/src/user32/win32wbase.cpp

    r1159 r1176  
    1 /* $Id: win32wbase.cpp,v 1.26 1999-10-07 09:28:01 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.27 1999-10-07 23:21:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    20032003      if (swp.cx < minTrack.x) swp.cx = minTrack.x;
    20042004      if (swp.cy < minTrack.y) swp.cy = minTrack.y;
     2005
     2006      RECTLOS2 rectFrame;
     2007
     2008      //Calculate correct frame rectangle from client rectangle
     2009      //NOTE: xLeft & yBottom can become too big
     2010      //Some programs use GetSystemMetrics 32/33 to determine offsets
     2011      rectFrame.xLeft   = swp.x;
     2012      rectFrame.yBottom = swp.y;
     2013      rectFrame.xRight  = swp.x + swp.cx;
     2014      rectFrame.yTop    = swp.y + swp.cy;
     2015
     2016      OSLibWinCalcFrameRect(OS2HwndFrame, &rectFrame, FALSE);     
     2017      swp.x  = rectFrame.xLeft;
     2018      swp.y  = rectFrame.yBottom;
     2019      swp.cx = rectFrame.xRight - rectFrame.xLeft;
     2020      swp.cy = rectFrame.yTop - rectFrame.yBottom;
     2021      if(swp.x < 0) {
     2022        swp.cx += -swp.x;
     2023        swp.x   = 0;
     2024      }
     2025      if(swp.y + swp.cy > ScreenHeight) {
     2026        swp.y = ScreenHeight - swp.cy;
     2027      }
    20052028      swp.hwnd = OS2HwndFrame;
    20062029   } else
  • trunk/src/user32/win32wdesktop.cpp

    r1014 r1176  
    1 /* $Id: win32wdesktop.cpp,v 1.1 1999-09-23 10:33:59 sandervl Exp $ */
     1/* $Id: win32wdesktop.cpp,v 1.2 1999-10-07 23:21:31 sandervl Exp $ */
    22/*
    33 * Win32 Desktop Window for OS/2
     
    4747  OS2HwndFrame = OSLIB_HWND_DESKTOP;
    4848  rectClient   = rectWindow;
     49  Win32Hwnd    = 0;
    4950
    5051  /* Find the window class */
Note: See TracChangeset for help on using the changeset viewer.