Changeset 2433 for trunk/src


Ignore:
Timestamp:
Jan 13, 2000, 9:11:39 PM (26 years ago)
Author:
sandervl
Message:

Client rectangle changes, GetDCEx bugfix (CS_OWNDC), scroll rectangle calculation fixes

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

Legend:

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

    r2421 r2433  
    1 /* $Id: dc.cpp,v 1.11 2000-01-12 17:37:28 cbratschi Exp $ */
     1/* $Id: dc.cpp,v 1.12 2000-01-13 20:11:36 sandervl Exp $ */
    22
    33/*
     
    679679//   isWindowOwnDC = (((hWindow == HWND_DESKTOP) ? FALSE : (wnd->isOwnDC() && wnd->getOwnDC()))
    680680   isWindowOwnDC = (((hWindow == HWND_DESKTOP) ? FALSE : (wnd->isOwnDC()))
    681                  && !(flags & DCX_CACHE_W));
     681                 && !(flags & DCX_CACHE_W|DCX_WINDOW_W));
    682682
    683683   if (isWindowOwnDC)
     
    814814      //SvL: Hack for memory.exe (doesn't get repainted properly otherwise)
    815815//      isOwnDC = wnd->isOwnDC() && wnd->getOwnDC();
    816       isOwnDC = wnd->isOwnDC();
     816      isOwnDC = wnd->isOwnDC() && (wnd->getOwnDC() == hdc);
    817817   }
    818818   if (isOwnDC)
     
    839839#endif
    840840
    841 #if 1
    842841   WinUpdateWindow(wnd->getOS2FrameWindowHandle());
    843 #else
    844    wnd->MsgPaint(0);
    845 #endif
    846842
    847843   return (TRUE);
     
    12711267    dprintf(("ScrollWindow %x %d %d %x %x", hwnd, dx, dy, pScroll, pClip));
    12721268    mapWin32ToOS2Rect(window,window->getClientRectPtr(),(PRECTLOS2)&clientRect);
     1269#if 0
    12731270    //Rectangle could be relative to parent window, so fix this
    12741271    if(clientRect.yBottom != 0) {
     
    12801277        clientRect.xLeft   = 0;
    12811278    }
     1279#endif
    12821280    if(pScroll) {
    12831281         mapWin32ToOS2Rect(window,(RECT *)pScroll, (PRECTLOS2)&scrollRect);
  • trunk/src/user32/new/menu.cpp

    r2415 r2433  
    1 /* $Id: menu.cpp,v 1.8 2000-01-12 12:40:43 sandervl Exp $*/
     1/* $Id: menu.cpp,v 1.9 2000-01-13 20:11:36 sandervl Exp $*/
    22/*
    33 * Menu functions
     
    31213121    DWORD ret;
    31223122
    3123     dprintf(("USER32: CheckMenuItem"));
     3123    dprintf(("USER32: CheckMenuItem %x %x %x", hMenu, id, flags));
    31243124
    31253125    //TRACE("menu=%04x id=%04x flags=%04x\n", hMenu, id, flags );
     
    31413141    POPUPMENU *menu;
    31423142
    3143     dprintf(("USER32: EnableMenuItem"));
     3143    dprintf(("USER32: EnableMenuItem %x %x %x", hMenu, wItemID, wFlags));
    31443144
    31453145    //TRACE("(%04x, %04X, %04X) !\n",
     
    33103310    MENUITEM *item;
    33113311
    3312     dprintf(("USER32: InsertMenuA"));
    3313 
    3314     //if (IS_STRING_ITEM(flags) && str)
     3312    if (IS_STRING_ITEM(flags) && str)
     3313        dprintf(("USER32: InsertMenuA %x %d %x %d %s", hMenu, pos, flags, id, str));
    33153314    //    TRACE("hMenu %04x, pos %d, flags %08x, "
    33163315    //                  "id %04x, str '%s'\n",
    33173316    //                  hMenu, pos, flags, id, str );
    3318     //else TRACE("hMenu %04x, pos %d, flags %08x, "
     3317    else // TRACE("hMenu %04x, pos %d, flags %08x, "
     3318        dprintf(("USER32: InsertMenuA %x %d %x %d %x", hMenu, pos, flags, id, str));
    33193319    //                   "id %04x, str %08lx (not a string)\n",
    33203320    //                   hMenu, pos, flags, id, (DWORD)str );
     
    33433343{
    33443344    BOOL ret;
    3345 
    3346     dprintf(("USER32: InsertMenuW"));
    33473345
    33483346    if (IS_STRING_ITEM(flags) && str)
     
    33753373                             UINT id, LPCWSTR data )
    33763374{
    3377     dprintf(("USER32: AppendMenuW"));
     3375    dprintf(("USER32: AppendMenuW %x %x %d %x", hMenu, flags, id, data));
    33783376
    33793377    return InsertMenuW( hMenu, -1, flags | MF_BYPOSITION, id, data );
     
    33893387    MENUITEM *item;
    33903388
    3391     dprintf(("USER32: RemoveMenu"));
     3389    dprintf(("USER32: RemoveMenu %x %d %x", hMenu, nPos, wFlags));
    33923390
    33933391    //TRACE("(menu=%04x pos=%04x flags=%04x)\n",hMenu, nPos, wFlags);
     
    34263424    MENUITEM *item = MENU_FindItem( &hMenu, &nPos, wFlags );
    34273425
    3428     dprintf(("USER32: DeleteMenu"));
     3426    dprintf(("USER32: DeleteMenu %x %d %x", hMenu, nPos, wFlags));
    34293427
    34303428    if (!item) return FALSE;
     
    34443442    MENUITEM *item;
    34453443
    3446     dprintf(("USER32: ModifyMenuA"));
    34473444
    34483445    if (IS_STRING_ITEM(flags))
    34493446    {
     3447        dprintf(("USER32: ModifyMenuA, %x %d %x %d %s", hMenu, pos, flags, id, str));
    34503448        //TRACE("%04x %d %04x %04x '%s'\n",
    34513449        //              hMenu, pos, flags, id, str ? str : "#NULL#" );
     
    34543452    else
    34553453    {
     3454        dprintf(("USER32: ModifyMenuA, %x %d %x %d %x", hMenu, pos, flags, id, str));
    34563455        //TRACE("%04x %d %04x %04x %08lx\n",
    34573456        //              hMenu, pos, flags, id, (DWORD)str );
     
    34703469{
    34713470    BOOL ret;
    3472 
    3473     dprintf(("USER32: ModifyMenuW"));
    34743471
    34753472    if (IS_STRING_ITEM(flags) && str)
     
    35163513 *         SetMenuItemBitmaps32    (USER32.490)
    35173514 */
    3518 BOOL WINAPI SetMenuItemBitmaps( HMENU hMenu, UINT nPos, UINT wFlags,
    3519                                     HBITMAP hNewUnCheck, HBITMAP hNewCheck)
     3515BOOL WINAPI SetMenuItemBitmaps(HMENU hMenu, UINT nPos, UINT wFlags,
     3516                               HBITMAP hNewUnCheck, HBITMAP hNewCheck)
    35203517{
    35213518    MENUITEM *item;
    35223519
    3523     dprintf(("USER32: SetMenuItemBitmaps"));
     3520    dprintf(("USER32: SetMenuItemBitmaps %x %d %x %x %x", hMenu, nPos, wFlags, hNewCheck, hNewUnCheck));
    35243521
    35253522    //TRACE("(%04x, %04x, %04x, %04x, %04x)\n",
     
    35723569    //TRACE("(%04x)\n", hMenu);
    35733570
    3574     dprintf(("USER32: DestroyMenu"));
     3571    dprintf(("USER32: DestroyMenu %x", hMenu));
    35753572
    35763573    /* Silently ignore attempts to destroy default system popup */
     
    37013698    HMENU retvalue;
    37023699
    3703     dprintf(("USER32: GetMenu"));
     3700    dprintf(("USER32: GetMenu %x", hWnd));
    37043701
    37053702    if (GetWindowLongA(hWnd,GWL_STYLE) & WS_CHILD) return 0;
     
    37143711    //TRACE("(%04x, %04x);\n", hWnd, hMenu);
    37153712
    3716     dprintf(("USER32: SetMenu"));
     3713    dprintf(("USER32: SetMenu %x %x", hWnd, hMenu));
    37173714
    37183715    if (hMenu && !IsMenu(hMenu))
     
    37563753    MENUITEM * lpmi;
    37573754
    3758     dprintf(("USER32: GetSubMenu"));
     3755    dprintf(("USER32: GetSubMenu %x %d", nPos));
    37593756
    37603757    if (!(lpmi = MENU_FindItem(&hMenu,(UINT*)&nPos,MF_BYPOSITION))) return 0;
     
    37713768    LPPOPUPMENU lppop;
    37723769
    3773     dprintf(("USER32: DrawMenuBar"));
     3770    dprintf(("USER32: DrawMenuBar %x", hWnd));
    37743771
    37753772    if (!(GetWindowLongA(hWnd,GWL_STYLE) & WS_CHILD) && getMenu(hWnd))
     
    38123809    HRSRC hrsrc = FindResourceA( instance, name, RT_MENUA );
    38133810
    3814     dprintf(("USER32: LoadMenuA"));
     3811    dprintf(("USER32: LoadMenuA %x %x", instance, name));
    38153812
    38163813    if (!hrsrc) return 0;
     
    38263823    HRSRC hrsrc = FindResourceW( instance, name, RT_MENUW );
    38273824
    3828     dprintf(("USER32: LoadMenuW"));
     3825    dprintf(("USER32: LoadMenuW %x %x", instance, name));
    38293826
    38303827    if (!hrsrc) return 0;
  • trunk/src/user32/new/pmframe.cpp

    r2426 r2433  
    1 /* $Id: pmframe.cpp,v 1.15 2000-01-13 13:54:52 sandervl Exp $ */
     1/* $Id: pmframe.cpp,v 1.16 2000-01-13 20:11:37 sandervl Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    287287
    288288          //CB: todo: use result for WM_CALCVALIDRECTS
    289           mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect);
     289//          mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect);
     290          mapWin32ToOS2Rect(win32wnd->getOS2FrameWindowHandle(), win32wnd->getClientRectPtr(), (PRECTLOS2)&rect);
    290291
    291292          swpClient.hwnd = win32wnd->getOS2WindowHandle();
     
    451452        win32wnd->MsgFormatFrame(NULL);
    452453        //CB: todo: use result for WM_CALCVALIDRECTS
    453         mapWin32ToOS2Rect(WinQueryWindow(win32wnd->getOS2FrameWindowHandle(),QW_PARENT),win32wnd->getOS2FrameWindowHandle(),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect);
     454//        mapWin32ToOS2Rect(WinQueryWindow(win32wnd->getOS2FrameWindowHandle(),QW_PARENT),win32wnd->getOS2FrameWindowHandle(),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect);
     455        mapWin32ToOS2Rect(win32wnd->getOS2FrameWindowHandle(), win32wnd->getClientRectPtr(), (PRECTLOS2)&rect);
     456
    454457
    455458        swpClient.hwnd = win32wnd->getOS2WindowHandle();
  • trunk/src/user32/new/scroll.cpp

    r2426 r2433  
    1 /* $Id: scroll.cpp,v 1.10 2000-01-13 13:54:53 sandervl Exp $ */
     1/* $Id: scroll.cpp,v 1.11 2000-01-13 20:11:37 sandervl Exp $ */
    22/*
    33 * Scrollbar control
     
    125125        if (!win32wnd) return FALSE;
    126126        rectClient = *win32wnd->getClientRectPtr();
    127         if(win32wnd->getParent())
    128                 mapWin32Rect(win32wnd->getParent() ? win32wnd->getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,win32wnd->getOS2FrameWindowHandle(),&rectClient);
    129127        lprect->left   = rectClient.left;
    130128        lprect->top    = rectClient.bottom;
     
    148146        if (!win32wnd) return FALSE;
    149147        rectClient = *win32wnd->getClientRectPtr();
    150         if(win32wnd->getParent())
    151                 mapWin32Rect(win32wnd->getParent() ? win32wnd->getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,win32wnd->getOS2FrameWindowHandle(),&rectClient);
    152148        lprect->left   = rectClient.right;
    153149        lprect->top    = rectClient.top;
     
    14731469{
    14741470    Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    1475 //    BOOL fShowH = (nBar == SB_HORZ) ? 0:fShow,fShowV = (nBar == SB_VERT) ? 0:fShow;
    14761471    BOOL fShowH = (nBar == SB_HORZ) ? fShow : 0;
    14771472    BOOL fShowV = (nBar == SB_VERT) ? fShow : 0;
  • trunk/src/user32/new/win32wbase.cpp

    r2426 r2433  
    1 /* $Id: win32wbase.cpp,v 1.38 2000-01-13 13:54:53 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.39 2000-01-13 20:11:37 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    1313 *
    1414 * TODO: Not thread/process safe
     15 *
     16 * NOTE: Client rectangle always relative to frame window; window rectangle in screen coordinates
    1517 *
    1618 * Project Odin Software License can be found in LICENSE.TXT
     
    639641  // Subclass frame
    640642  pOldFrameProc = FrameSubclassFrameWindow(this);
    641   //if (isChild()) FrameSetBorderSize(this,TRUE);
    642643
    643644  //preset rects
     
    647648  rectWindow.bottom = cs->y+cs->cy;
    648649  rectClient = rectWindow; //dummy client rect
     650  OffsetRect(&rectClient, -rectClient.left, -rectClient.top);
     651
    649652  if (getParent()) mapWin32Rect(getParent()->getOS2WindowHandle(),OSLIB_HWND_DESKTOP,&rectWindow);
    650653  /* Send the WM_CREATE message
     
    660663  if (SendInternalMessageA(WM_NCCREATE,0,(LPARAM)cs))
    661664  {
     665        RECT tmpRect;
     666
    662667        //update rect
    663668        rectWindow.left = cs->x;
     
    665670        rectWindow.top = cs->y;
    666671        rectWindow.bottom = cs->y+cs->cy;
     672        tmpRect = rectWindow;
    667673        if (getParent()) mapWin32Rect(getParent()->getOS2WindowHandle(),OSLIB_HWND_DESKTOP,&rectWindow);
    668674        OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top);
     675
    669676        rectClient = rectWindow;
    670         if (getParent()) mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),&rectClient);
     677        OffsetRect(&rectClient, -rectClient.left, -rectClient.top);
     678
    671679        //set the window size and update the client
    672         SetWindowPos(hwndLinkAfter,rectClient.left,rectClient.top,rectClient.right-rectClient.left,rectClient.bottom-rectClient.top,SWP_NOACTIVATE | SWP_NOREDRAW | SWP_FRAMECHANGED);
     680        SetWindowPos(hwndLinkAfter, tmpRect.left, tmpRect.top, tmpRect.right-tmpRect.left, tmpRect.bottom-tmpRect.top,SWP_NOACTIVATE | SWP_NOREDRAW | SWP_FRAMECHANGED);
    673681        fNoSizeMsg = FALSE;
    674682        if (cs->style & WS_VISIBLE) dwStyle |= WS_VISIBLE; //program could change position in WM_CREATE
     
    679687                                MAKELONG(rectClient.right-rectClient.left,
    680688                                         rectClient.bottom-rectClient.top));
    681                 SendInternalMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
     689                DWORD lParam;
     690
     691                if(getParent()) {//in parent coordinates
     692                    POINT point;
     693
     694                    point.x = rectClient.left;
     695                    point.y = rectClient.top;
     696                    MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1);
     697
     698                    lParam = MAKELONG(point.x, point.y);
     699                }
     700                else {//in screen coordinates
     701                    lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top);
     702                }
     703                SendInternalMessageA(WM_MOVE, 0, lParam);
    682704            }
    683705
     
    10361058    RECT client = rectClient;
    10371059
    1038     mapWin32Rect(getParent() ? getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,OS2HwndFrame,&client);
     1060////    mapWin32Rect(getParent() ? getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,OS2HwndFrame,&client);
    10391061    if ((rect.left >= client.left) && (rect.left < client.right) &&
    10401062        (rect.right >= client.left) && (rect.right < client.right) &&
     
    14051427    case WM_WINDOWPOSCHANGED:
    14061428    {
    1407 
    1408 /* undocumented SWP flags - from SDK 3.1 */
    1409 #define SWP_NOCLIENTSIZE        0x0800
    1410 #define SWP_NOCLIENTMOVE        0x1000
    1411 
    14121429        PWINDOWPOS wpos = (PWINDOWPOS)lParam;
    14131430        WPARAM     wp   = SIZE_RESTORED;
    14141431
    14151432        if (!(wpos->flags & SWP_NOMOVE) && !(wpos->flags & SWP_NOCLIENTMOVE))
    1416             SendInternalMessageA(WM_MOVE, 0, MAKELONG(rectClient.left, rectClient.top));
    1417 
     1433        {
     1434            DWORD lParam;
     1435
     1436            if(getParent()) {//in parent coordinates
     1437                POINT point;
     1438
     1439                point.x = rectClient.left;
     1440                point.y = rectClient.top;
     1441                MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1);
     1442
     1443                lParam = MAKELONG(point.x, point.y);
     1444            }
     1445            else {//in screen coordinates
     1446                lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top);
     1447            }
     1448            SendInternalMessageA(WM_MOVE, 0, lParam);
     1449        }
    14181450        if (!(wpos->flags & SWP_NOSIZE) && !(wpos->flags & SWP_NOCLIENTSIZE))
    14191451        {
     
    14221454
    14231455            SendInternalMessageA(WM_SIZE, wp, MAKELONG(rectClient.right  - rectClient.left,
    1424                                                rectClient.bottom - rectClient.top));
     1456                                                       rectClient.bottom - rectClient.top));
    14251457        }
    14261458        return 0;
     
    19391971
    19401972    dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow));
    1941 #if 1
     1973
    19421974    if (flags & WIN_NEED_SIZE)
    19431975    {
     
    19551987                     MAKELONG(rectClient.right-rectClient.left,
    19561988                              rectClient.bottom-rectClient.top));
    1957         SendInternalMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
    1958     }
    1959 #else
    1960     if(fFirstShow) {
    1961         if(isFrameWindow() && IS_OVERLAPPED(getStyle()) && !isChild()) {
    1962                 SendInternalMessageA(WM_SIZE, SIZE_RESTORED,
    1963                                 MAKELONG(rectClient.right-rectClient.left,
    1964                                          rectClient.bottom-rectClient.top));
    1965                 SendInternalMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
    1966 
    1967         }
    1968         fFirstShow = FALSE;
    1969     }
    1970 #endif
     1989        DWORD lParam;
     1990
     1991        if(getParent()) {//in parent coordinates
     1992            POINT point;
     1993
     1994            point.x = rectClient.left;
     1995            point.y = rectClient.top;
     1996            MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1);
     1997
     1998            lParam = MAKELONG(point.x, point.y);
     1999        }
     2000        else {//in screen coordinates
     2001            lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top);
     2002        }
     2003        SendInternalMessageA(WM_MOVE, 0, lParam);
     2004    }
    19712005    switch(nCmdShow)
    19722006    {
  • trunk/src/user32/new/win32wbase.h

    r2426 r2433  
    1 /* $Id: win32wbase.h,v 1.26 2000-01-13 13:54:54 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.27 2000-01-13 20:11:38 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    206206         HWND   GetParent();
    207207         HWND   SetParent(HWND hwndNewParent);
     208
    208209         BOOL   IsChild(HWND hwndParent);
    209210         HWND   GetTopWindow();
  • trunk/src/user32/new/win32wbasenonclient.cpp

    r2426 r2433  
    1 /* $Id: win32wbasenonclient.cpp,v 1.4 2000-01-13 13:54:54 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.5 2000-01-13 20:11:39 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    357357  UINT style;
    358358
    359   if (!calcValidRects) return 0;
    360 
    361   style = (UINT) GetClassLongA(Win32Hwnd,GCL_STYLE);
    362 
    363   if (style & CS_VREDRAW) result |= WVR_VREDRAW;
    364   if (style & CS_HREDRAW) result |= WVR_HREDRAW;
    365 
    366   clientRect = &((NCCALCSIZE_PARAMS*)winRect)->rgrc[2];
    367   *clientRect = rectWindow;
    368   if (getParent()) mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),clientRect);
    369 
    370   if(!(dwStyle & WS_MINIMIZE))
    371   {
    372     AdjustRectOuter(&tmpRect,FALSE);
    373 
    374     clientRect->left   -= tmpRect.left;
    375     clientRect->top    -= tmpRect.top;
    376     clientRect->right  -= tmpRect.right;
    377     clientRect->bottom -= tmpRect.bottom;
    378 
    379     if (HAS_MENU())
    380     {
    381       clientRect->top +=
     359    if (!calcValidRects) return 0;
     360
     361    style = (UINT) GetClassLongA(Win32Hwnd,GCL_STYLE);
     362
     363    if (style & CS_VREDRAW) result |= WVR_VREDRAW;
     364    if (style & CS_HREDRAW) result |= WVR_HREDRAW;
     365
     366    clientRect = &((NCCALCSIZE_PARAMS*)winRect)->rgrc[2];
     367    *clientRect = rectWindow;
     368#if 1
     369    OffsetRect(clientRect, -clientRect->left, -clientRect->top);
     370#else
     371    if(getParent()) {//in parent coordinates
     372        OffsetRect(clientRect, -clientRect->left, -clientRect->top);
     373        MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), (POINT *)clientRect, 2);
     374    }
     375    //else in screen coordinates (already in screen coordinates)
     376#endif
     377
     378    if(!(dwStyle & WS_MINIMIZE))
     379    {
     380        AdjustRectOuter(&tmpRect,FALSE);
     381
     382        clientRect->left   -= tmpRect.left;
     383        clientRect->top    -= tmpRect.top;
     384        clientRect->right  -= tmpRect.right;
     385        clientRect->bottom -= tmpRect.bottom;
     386
     387        if (HAS_MENU())
     388        {
     389            clientRect->top +=
    382390                MENU_GetMenuBarHeight(Win32Hwnd,
    383391                                       winRect->right - winRect->left,
    384392                                       -tmpRect.left, -tmpRect.top ) + 1;
    385     }
    386 
    387     SetRect (&tmpRect, 0, 0, 0, 0);
    388     AdjustRectInner(&tmpRect);
    389     clientRect->left   -= tmpRect.left;
    390     clientRect->top    -= tmpRect.top;
    391     clientRect->right  -= tmpRect.right;
    392     clientRect->bottom -= tmpRect.bottom;
    393   }
    394 
    395   return result;
     393        }
     394
     395        SetRect (&tmpRect, 0, 0, 0, 0);
     396        AdjustRectInner(&tmpRect);
     397        clientRect->left   -= tmpRect.left;
     398        clientRect->top    -= tmpRect.top;
     399        clientRect->right  -= tmpRect.right;
     400        clientRect->bottom -= tmpRect.bottom;
     401    }
     402
     403    return result;
    396404}
    397405//******************************************************************************
  • trunk/src/user32/new/win32wbasepos.cpp

    r2410 r2433  
    1 /* $Id: win32wbasepos.cpp,v 1.5 2000-01-11 17:34:44 cbratschi Exp $ */
     1/* $Id: win32wbasepos.cpp,v 1.6 2000-01-13 20:11:39 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (nonclient/position methods)
     
    134134        winposCopy = *winpos;
    135135        params.rgrc[1] = *oldWindowRect;
     136#if 0
     137        if(getParent()) {//in parent coordinates
     138            MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), (POINT *)oldClientRect, 2);
     139        }
     140        else {//in screen coordinates (just add window rectangle origin (already in screen coordinates))
     141            OffsetRect(oldClientRect, rectWindow.left, rectWindow.top);
     142        }
     143#endif
    136144        params.rgrc[2] = *oldClientRect;
    137145        params.lppos = &winposCopy;
    138146   }
    139    result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect,
    140                          (LPARAM)&params );
     147   result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, (LPARAM)&params );
    141148   if (calcValidRect)
    142149   {
    143150      /* If the application send back garbage, ignore it */
    144151      if (params.rgrc[2].left <= params.rgrc[2].right && params.rgrc[2].top <= params.rgrc[2].bottom)
    145          *newClientRect = params.rgrc[2];
     152      {
     153        *newClientRect = params.rgrc[2];
     154#if 0
     155        if(getParent()) {//in parent coordinates
     156            MapWindowPoints(getParent()->getWindowHandle(), getWindowHandle(), (POINT *)newClientRect, 2);
     157        }
     158        else {//in screen coordinates (just add window rectangle origin (already in screen coordinates))
     159            OffsetRect(newClientRect, -rectWindow.left, -rectWindow.top);
     160        }
     161#endif
     162      }
    146163      else
    147164        SetRectEmpty(newClientRect);
Note: See TracChangeset for help on using the changeset viewer.