Ignore:
Timestamp:
Jan 14, 2000, 2:16:59 PM (26 years ago)
Author:
sandervl
Message:

Several window position bugfixes

File:
1 edited

Legend:

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

    r2433 r2435  
    1 /* $Id: win32wbasenonclient.cpp,v 1.5 2000-01-13 20:11:39 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.6 2000-01-14 13:16:58 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    234234  {
    235235    case HTCAPTION:
    236       SetActiveWindow();
     236      if (GetActiveWindow() != Win32Hwnd)
     237        SetActiveWindow();
     238
    237239      if (GetActiveWindow() == Win32Hwnd)
    238240        SendInternalMessageA(WM_SYSCOMMAND,SC_MOVE+HTCAPTION,lParam);
     
    353355LONG Win32BaseWindow::HandleNCCalcSize(BOOL calcValidRects,RECT *winRect)
    354356{
    355   RECT tmpRect = { 0, 0, 0, 0 },*clientRect;
    356   LONG result = WVR_ALIGNTOP | WVR_ALIGNLEFT;
     357  RECT tmpRect = { 0, 0, 0, 0 };
     358  LONG result = 0;
    357359  UINT style;
    358360
     
    364366    if (style & CS_HREDRAW) result |= WVR_HREDRAW;
    365367
    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 
    378368    if(!(dwStyle & WS_MINIMIZE))
    379369    {
    380370        AdjustRectOuter(&tmpRect,FALSE);
    381371
    382         clientRect->left   -= tmpRect.left;
    383         clientRect->top    -= tmpRect.top;
    384         clientRect->right  -= tmpRect.right;
    385         clientRect->bottom -= tmpRect.bottom;
     372        winRect->left   -= tmpRect.left;
     373        winRect->top    -= tmpRect.top;
     374        winRect->right  -= tmpRect.right;
     375        winRect->bottom -= tmpRect.bottom;
    386376
    387377        if (HAS_MENU())
    388378        {
    389             clientRect->top +=
     379            winRect->top +=
    390380                MENU_GetMenuBarHeight(Win32Hwnd,
    391                                        winRect->right - winRect->left,
    392                                        -tmpRect.left, -tmpRect.top ) + 1;
     381                                      winRect->right - winRect->left,
     382                                      -tmpRect.left, -tmpRect.top ) + 1;
    393383        }
    394384
    395385        SetRect (&tmpRect, 0, 0, 0, 0);
    396386        AdjustRectInner(&tmpRect);
    397         clientRect->left   -= tmpRect.left;
    398         clientRect->top    -= tmpRect.top;
    399         clientRect->right  -= tmpRect.right;
    400         clientRect->bottom -= tmpRect.bottom;
     387        winRect->left   -= tmpRect.left;
     388        winRect->top    -= tmpRect.top;
     389        winRect->right  -= tmpRect.right;
     390        winRect->bottom -= tmpRect.bottom;
    401391    }
    402392
Note: See TracChangeset for help on using the changeset viewer.