Changeset 2529 for trunk/src


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

WINE code clean-up

Location:
trunk/src/user32
Files:
1 deleted
5 edited

Legend:

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

    r2515 r2529  
    1 /* $Id: dc.cpp,v 1.36 2000-01-25 20:39:41 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.37 2000-01-27 17:21:08 cbratschi Exp $ */
    22
    33/*
     
    828828   if (hwnd)
    829829   {
    830         Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
    831         if(wnd == NULL) {
    832                 dprintf(("ERROR: ReleaseDC %x %x failed", hwnd, hdc));
    833                 return 0;
    834         }
    835         //SvL: Hack for memory.exe (doesn't get repainted properly otherwise)
     830        Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
     831        if(wnd == NULL) {
     832                dprintf(("ERROR: ReleaseDC %x %x failed", hwnd, hdc));
     833                return 0;
     834        }
     835        //SvL: Hack for memory.exe (doesn't get repainted properly otherwise)
    836836//      isOwnDC = wnd->isOwnDC() && wnd->getOwnDC();
    837         isOwnDC = wnd->isOwnDC() && (wnd->getOwnDC() == hdc);
     837        isOwnDC = wnd->isOwnDC() && (wnd->getOwnDC() == hdc);
    838838   }
    839839   if (isOwnDC)
     
    10401040{
    10411041   BOOL result;
    1042    
     1042
    10431043   result = RedrawWindow (hwnd, pRect, NULLHANDLE,
    10441044                          RDW_ALLCHILDREN_W | RDW_INVALIDATE_W |
     
    12501250 APIRET  rc;
    12511251 RECTL   clientRect;
     1252 PRECT   pClientRect;
    12521253 RECTL   scrollRect;
    12531254 RECTL   clipRect;
    1254  PRECT   pClientRect;
    12551255 PRECTL  pScrollRect = NULL;
    12561256 PRECTL  pClipRect   = NULL;
     
    12631263    }
    12641264    dprintf(("ScrollWindow %x %d %d %x %x", hwnd, dx, dy, pScroll, pClip));
     1265
    12651266    pClientRect = window->getClientRectPtr();
    12661267    clientRect.xLeft   = 0;
     
    12681269    clientRect.xRight  = pClientRect->right - pClientRect->left;
    12691270    clientRect.yTop    = pClientRect->bottom - pClientRect->top;
     1271
    12701272    if(pScroll) {
    12711273         mapWin32ToOS2Rect(window,(RECT *)pScroll, (PRECTLOS2)&scrollRect);
  • trunk/src/user32/win32wbase.cpp

    r2521 r2529  
    1 /* $Id: win32wbase.cpp,v 1.145 2000-01-26 18:02:36 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.146 2000-01-27 17:21:09 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    20482048  dprintf(("CB: cx is 0! %d",fuFlags));
    20492049  if (fuFlags & SWP_NOSIZE) dprintf(("CB: nosize"));
    2050   //cx = 50;
     2050  cx = 50;
    20512051}
    20522052if (cy == 0)
     
    20542054  dprintf(("CB: cy is 0! %d",fuFlags));
    20552055  if (fuFlags & SWP_NOSIZE) dprintf(("CB: nosize"));
    2056   //cy = 50;
     2056  cy = 50;
    20572057}
    20582058
  • trunk/src/user32/win32wbase.h

    r2521 r2529  
    1 /* $Id: win32wbase.h,v 1.74 2000-01-26 18:02:37 cbratschi Exp $ */
     1/* $Id: win32wbase.h,v 1.75 2000-01-27 17:21:09 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    386386        LONG  HandleNCLButtonDblClk(WPARAM wParam,LPARAM lParam);
    387387        LONG  HandleNCRButtonUp(WPARAM wParam,LPARAM lParam);
    388         BOOL  WindowNeedsWMBorder();
    389388        VOID  AdjustRectOuter(LPRECT rect,BOOL menu);
    390389        VOID  AdjustRectInner(LPRECT rect);
  • 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
  • trunk/src/user32/window.cpp

    r2521 r2529  
    1 /* $Id: window.cpp,v 1.51 2000-01-26 18:02:38 cbratschi Exp $ */
     1/* $Id: window.cpp,v 1.52 2000-01-27 17:21:10 cbratschi Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    817817
    818818    //Adjust rect outer (Win32BaseWindow::AdjustRectOuter)
    819     /* Decide if the window will be managed (see CreateWindowEx) */
    820     //if (!WindowNeedsWMBorder()) //CB: check Options.managed
    821     {
    822       if (HAS_THICKFRAME(style,exStyle))
    823         InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     819    if (HAS_THICKFRAME(style,exStyle))
     820      InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     821    else
     822      if (HAS_DLGFRAME(style,exStyle))
     823        InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
    824824      else
    825         if (HAS_DLGFRAME(style,exStyle))
    826           InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
    827         else
    828           if (HAS_THINFRAME(style))
    829             InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
    830 
    831       if ((style & WS_CAPTION) == WS_CAPTION)
    832       {
    833         if (exStyle & WS_EX_TOOLWINDOW)
    834           rect->top -= GetSystemMetrics(SM_CYSMCAPTION);
    835         else
    836           rect->top -= GetSystemMetrics(SM_CYCAPTION);
    837       }
     825        if (HAS_THINFRAME(style))
     826          InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
     827
     828    if ((style & WS_CAPTION) == WS_CAPTION)
     829    {
     830      if (exStyle & WS_EX_TOOLWINDOW)
     831        rect->top -= GetSystemMetrics(SM_CYSMCAPTION);
     832      else
     833        rect->top -= GetSystemMetrics(SM_CYCAPTION);
    838834    }
    839835
     
    13071303    {
    13081304      hwnd = Win32BaseWindow::OS2ToWin32Handle(hwndOS2);
    1309       if (!hwnd)
    1310       {
    1311         //CB: could be a frame control
    1312         hwndOS2 = OSLibWinQueryWindow(hwndOS2,QWOS_PARENT);
    1313         hwnd = Win32BaseWindow::OS2ToWin32Handle(hwndOS2);
    1314       }
    13151305      if(hwnd) {
    13161306              dprintf(("WindowFromPoint (%d,%d) %x->%x\n", point.x, point.y, hwndOS2, hwnd));
Note: See TracChangeset for help on using the changeset viewer.