Ignore:
Timestamp:
Dec 29, 1999, 11:54:04 PM (26 years ago)
Author:
cbratschi
Message:

new mapping functions, fixed 1 pixel and window handle bugs

File:
1 edited

Legend:

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

    r2204 r2257  
    1 /* $Id: pmframe.cpp,v 1.30 1999-12-26 17:30:16 cbratschi Exp $ */
     1/* $Id: pmframe.cpp,v 1.31 1999-12-29 22:54:01 cbratschi Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    103103BOOL CanDrawSizeBox(Win32BaseWindow *win32wnd)
    104104{
    105   return (win32wnd->getStyle() & WS_SIZEBOX_W && WinQueryWindowULong(win32wnd->getOS2FrameWindowHandle(),QWL_STYLE) & FS_SIZEBORDER
     105  return ((win32wnd->getStyle() & WS_SIZEBOX_W) && (WinQueryWindowULong(win32wnd->getOS2FrameWindowHandle(),QWL_STYLE) & FS_SIZEBORDER)
    106106          && win32wnd->getVertScrollHandle() && WinQueryWindow(win32wnd->getVertScrollHandle(),QW_PARENT) == win32wnd->getOS2FrameWindowHandle()
    107107          && win32wnd->getHorzScrollHandle() && WinQueryWindow(win32wnd->getHorzScrollHandle(),QW_PARENT) == win32wnd->getOS2FrameWindowHandle());
     
    347347        DWORD dwStyle = win32wnd->getWindowClass()->getClassLongA(GCL_STYLE_W);
    348348
    349         if (dwStyle & CS_HREDRAW_W && newRect->xRight-newRect->xLeft != oldRect->xRight-oldRect->xLeft)
     349        if ((dwStyle & CS_HREDRAW_W) && (newRect->xRight-newRect->xLeft != oldRect->xRight-oldRect->xLeft))
    350350          res |= CVR_REDRAW;
    351         else if (dwStyle & CS_VREDRAW_W && newRect->yTop-newRect->yBottom != oldRect->yTop-oldRect->yBottom)
     351        else if ((dwStyle & CS_VREDRAW_W) && (newRect->yTop-newRect->yBottom != oldRect->yTop-oldRect->yBottom))
    352352          res |= CVR_REDRAW;
    353353      } else res |= CVR_REDRAW;
     
    514514  FrameGetBorderSize(win32wnd,&point);
    515515  WinSendMsg(win32wnd->getOS2FrameWindowHandle(),WM_SETBORDERSIZE,(MPARAM)win32wnd->getBorderWidth(),(MPARAM)win32wnd->getBorderHeight());
    516   if (point.x != win32wnd->getBorderWidth() || point.y != win32wnd->getBorderHeight())
     516  if ((point.x != win32wnd->getBorderWidth()) || (point.y != win32wnd->getBorderHeight()))
    517517  {
    518518    INT xDiff = win32wnd->getBorderWidth()-point.x;
     
    582582    HWND hwndCurPar = WinQueryWindow(win32wnd->getHorzScrollHandle(),QW_PARENT);
    583583
    584     if ((fShow && hwndCurPar == hwndObj) || (!fShow && hwndCurPar != hwndObj))
     584    if ((fShow && (hwndCurPar == hwndObj)) || (!fShow && (hwndCurPar != hwndObj)))
    585585    {
    586586      WinSetParent(win32wnd->getHorzScrollHandle(),fShow ? win32wnd->getOS2FrameWindowHandle():HWND_OBJECT,FALSE);
     
    593593    HWND hwndCurPar = WinQueryWindow(win32wnd->getVertScrollHandle(),QW_PARENT);
    594594
    595     if ((fShow && hwndCurPar == hwndObj) || (!fShow && hwndCurPar != hwndObj))
     595    if ((fShow && (hwndCurPar == hwndObj)) || (!fShow && (hwndCurPar != hwndObj)))
    596596    {
    597597      WinSetParent(win32wnd->getVertScrollHandle(),fShow ? win32wnd->getOS2FrameWindowHandle():HWND_OBJECT,FALSE);
     
    619619  if (win32wnd->getOS2WindowHandle() == WinQueryCapture(HWND_DESKTOP)) return HTCLIENT_W;
    620620  point.x = x;
    621   point.y = WinQuerySysValue(HWND_DESKTOP,SV_CYSCREEN)-y-1;
     621  point.y = mapScreenY(y);
    622622  WinMapWindowPoints(HWND_DESKTOP,hwnd,&point,1);
    623623  child = WinWindowFromPoint(hwnd,&point,FALSE);
Note: See TracChangeset for help on using the changeset viewer.