Ignore:
Timestamp:
Jan 27, 2000, 6:21:10 PM (26 years ago)
Author:
cbratschi
Message:

WINE code clean-up

File:
1 edited

Legend:

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

    r2521 r2529  
    1 /* $Id: win32wbasenonclient.cpp,v 1.5 2000-01-26 18:02:37 cbratschi Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.6 2000-01-27 17:21:09 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    7474  WORD wStateChange;
    7575
    76   //CB: only caption is changed on activation
    77   if (!(dwStyle & WS_CAPTION)) return TRUE;
    78 
    7976  if( wParam ) wStateChange = !(flags & WIN_NCACTIVATED);
    8077  else wStateChange = flags & WIN_NCACTIVATED;
     
    8481    if (wParam) flags |= WIN_NCACTIVATED;
    8582    else flags &= ~WIN_NCACTIVATED;
     83
     84    if (!(dwStyle & WS_CAPTION)) return TRUE;
    8685
    8786    if(!(dwStyle & WS_MINIMIZE))
     
    303302//******************************************************************************
    304303//******************************************************************************
    305 BOOL Win32BaseWindow::WindowNeedsWMBorder()
    306 {
    307   if (!(dwStyle & WS_CHILD) &&
    308       //Options.managed  && //CB: to check
    309       !(dwExStyle & WS_EX_TOOLWINDOW) &&
    310       ( ((dwStyle & WS_CAPTION) == WS_CAPTION) ||
    311         (dwStyle & WS_THICKFRAME)))
    312       return TRUE;
    313   if (dwExStyle & WS_EX_TRAYWINDOW)
    314     return TRUE;
    315   return FALSE;
    316 }
    317 //******************************************************************************
    318 //******************************************************************************
    319304VOID Win32BaseWindow::AdjustMaximizedRect(LPRECT rect)
    320305{
    321   /* Decide if the window will be managed (see CreateWindowEx) */
    322   //if (!WindowNeedsWMBorder()) //CB: check Options.managed
    323   {
    324     if (HAS_THICKFRAME(dwStyle,dwExStyle ))
    325       InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     306  if (HAS_THICKFRAME(dwStyle,dwExStyle ))
     307    InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     308  else
     309    if (HAS_DLGFRAME( dwStyle, dwExStyle ))
     310      InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
    326311    else
    327       if (HAS_DLGFRAME( dwStyle, dwExStyle ))
    328         InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
    329       else
    330         if (HAS_THINFRAME( dwStyle ))
    331           InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
    332   }
     312      if (HAS_THINFRAME( dwStyle ))
     313        InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
    333314}
    334315//******************************************************************************
     
    345326  if(dwStyle & WS_ICONIC) return;
    346327
    347   /* Decide if the window will be managed (see CreateWindowEx) */
    348   //if (!WindowNeedsWMBorder()) //CB: check Options.managed
    349   {
    350     if (HAS_THICKFRAME(dwStyle,dwExStyle ))
    351       InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     328  if (HAS_THICKFRAME(dwStyle,dwExStyle ))
     329    InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     330  else
     331    if (HAS_DLGFRAME( dwStyle, dwExStyle ))
     332      InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
    352333    else
    353       if (HAS_DLGFRAME( dwStyle, dwExStyle ))
    354         InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
    355       else
    356         if (HAS_THINFRAME( dwStyle ))
    357           InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
    358 
    359     if ((dwStyle & WS_CAPTION) == WS_CAPTION)
    360     {
    361       if (dwExStyle & WS_EX_TOOLWINDOW)
    362         rect->top -= GetSystemMetrics(SM_CYSMCAPTION);
    363       else
    364         rect->top -= GetSystemMetrics(SM_CYCAPTION);
    365     }
     334      if (HAS_THINFRAME( dwStyle ))
     335        InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
     336
     337  if ((dwStyle & WS_CAPTION) == WS_CAPTION)
     338  {
     339    if (dwExStyle & WS_EX_TOOLWINDOW)
     340      rect->top -= GetSystemMetrics(SM_CYSMCAPTION);
     341    else
     342      rect->top -= GetSystemMetrics(SM_CYCAPTION);
    366343  }
    367344
Note: See TracChangeset for help on using the changeset viewer.