Ignore:
Timestamp:
Aug 12, 2002, 5:05:43 PM (23 years ago)
Author:
sandervl
Message:

Wine (X11) resync for AdjustRectOuter

File:
1 edited

Legend:

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

    r8654 r8988  
    1 /* $Id: win32wbasenonclient.cpp,v 1.40 2002-06-13 13:45:46 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.41 2002-08-12 15:05:43 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    355355VOID Win32BaseWindow::AdjustRectOuter(LPRECT rect,BOOL menu)
    356356{
     357    int adjust;
    357358    if(dwStyle & WS_ICONIC) return;
    358359
    359     if (HAS_THICKFRAME(dwStyle,dwExStyle ))
    360         InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     360    if ((dwExStyle & (WS_EX_STATICEDGE|WS_EX_DLGMODALFRAME)) ==
     361        WS_EX_STATICEDGE)
     362    {
     363        adjust = 1; /* for the outer frame always present */
     364    }
    361365    else
    362     if (HAS_DLGFRAME( dwStyle, dwExStyle ))
    363         InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
    364     else
    365     if (HAS_THINFRAME( dwStyle ))
    366         InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
     366    {
     367        adjust = 0;
     368        if ((dwExStyle & WS_EX_DLGMODALFRAME) ||
     369            (dwStyle & (WS_THICKFRAME|WS_DLGFRAME))) adjust = 2; /* outer */
     370    }
     371    if (dwStyle & WS_THICKFRAME)
     372        adjust +=  ( GetSystemMetrics (SM_CXFRAME)
     373                   - GetSystemMetrics (SM_CXDLGFRAME)); /* The resize border */
     374    if ((dwStyle & (WS_BORDER|WS_DLGFRAME)) ||
     375        (dwExStyle & WS_EX_DLGMODALFRAME))
     376        adjust++; /* The other border */
     377
     378    InflateRect (rect, adjust, adjust);
    367379
    368380    if ((dwStyle & WS_CAPTION) == WS_CAPTION)
     
    373385            rect->top -= GetSystemMetrics(SM_CYCAPTION);
    374386    }
    375 
    376     if (menu)
    377         rect->top -= GetSystemMetrics(SM_CYMENU);
     387    if (menu) rect->top -= GetSystemMetrics(SM_CYMENU);
    378388}
    379389//******************************************************************************
     
    385395  if (dwExStyle & WS_EX_CLIENTEDGE)
    386396    InflateRect (rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
    387 
    388   if (dwExStyle & WS_EX_STATICEDGE)
    389     InflateRect (rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
     397 
     398  //@@PF Wine does not have this but inner rect shrinks when
     399  //WS_EX_STATICEDGE is usedd not on a child
     400
     401  if (dwExStyle & WS_EX_STATICEDGE && (!(dwStyle & WS_CHILD)))
     402    InflateRect (rect, -GetSystemMetrics(SM_CXBORDER), -GetSystemMetrics(SM_CYBORDER));
    390403
    391404  if (dwStyle & WS_VSCROLL) rect->right  += GetSystemMetrics(SM_CXVSCROLL);
Note: See TracChangeset for help on using the changeset viewer.