Changeset 5258 for trunk/src


Ignore:
Timestamp:
Feb 23, 2001, 3:52:42 PM (25 years ago)
Author:
sandervl
Message:

mdi, setcursor, min/max/restore, dlglist changes

Location:
trunk/src/user32
Files:
6 edited

Legend:

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

    r5246 r5258  
    1 /* $Id: pmwindow.cpp,v 1.119 2001-02-22 18:18:59 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.120 2001-02-23 14:52:41 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    472472                else redrawAll = TRUE;
    473473
     474                if(win32wnd->IsMixMaxStateChanging()) {
     475                    dprintf(("WM_CALCVALIDRECT: window changed min/max/restore state, invalidate entire window"));
     476                    redrawAll = TRUE;
     477                }
     478
    474479                if (redrawAll)
    475480                {
     
    581586        SWP       swpOld;
    582587        WINDOWPOS wp;
    583         RECTL     newClientrect, oldClientRect;
     588        RECTL     newClientRect, oldClientRect;
    584589        ULONG     nccalcret;
    585590//        UINT      res = CVR_ALIGNLEFT | CVR_ALIGNTOP;
     
    616621
    617622        //Get new client rectangle
    618         mapWin32ToOS2Rect(pswp->cy, win32wnd->getClientRectPtr(), (PRECTLOS2)&newClientrect);
     623        mapWin32ToOS2Rect(pswp->cy, win32wnd->getClientRectPtr(), (PRECTLOS2)&newClientRect);
    619624
    620625        if(nccalcret == 0) {
     
    647652            }
    648653        }
    649         if(res != 0) {
    650 
     654        if(win32wnd->IsMixMaxStateChanging()) {
     655            dprintf(("WM_CALCVALIDRECT: window changed min/max/restore state, invalidate entire window"));
     656            res |= CVR_REDRAW;
     657        }
     658        if(res == (CVR_ALIGNTOP|CVR_ALIGNLEFT)) {
     659            oldRect->xRight  -= oldClientRect.xLeft;
     660            oldRect->yBottom += oldClientRect.yBottom;
     661            newRect->xRight  -= newClientRect.xLeft;
     662            newRect->yBottom += newClientRect.yBottom;
    651663        }
    652664
  • trunk/src/user32/win32wbase.cpp

    r5246 r5258  
    1 /* $Id: win32wbase.cpp,v 1.243 2001-02-22 18:18:59 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.244 2001-02-23 14:52:41 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    105105  fCreateSetWindowPos = FALSE;
    106106  fCreationFinished= FALSE;
     107  fMinMaxChange    = FALSE;
    107108
    108109  windowNameA      = NULL;
     
    14891490    {
    14901491        dprintf(("DefWndProc: WM_SETCURSOR for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam))));
    1491         if((getStyle() & WS_CHILD) && !(getExStyle() & WS_EX_NOPARENTNOTIFY))
     1492        if((getStyle() & WS_CHILD))
    14921493        {
    14931494            if(getParent()) {
     
    14961497            }
    14971498        }
    1498         if (wParam == Win32Hwnd)
     1499        if (wParam == getWindowHandle())
    14991500        {
    15001501          HCURSOR hCursor;
     
    22102211            if( !(getStyle() & WS_MINIMIZE) ) {
    22112212                 swp |= MinMaximize(SW_MINIMIZE, &newPos );
     2213                 fMinMaxChange = TRUE; //-> invalidate entire window in WM_CALCINVALIDRECT
    22122214            }
    22132215            else swp |= SWP_NOSIZE | SWP_NOMOVE;
     
    22172219    case SW_SHOWMAXIMIZED: /* same as SW_MAXIMIZE */
    22182220        swp |= SWP_SHOWWINDOW | SWP_FRAMECHANGED;
    2219         if( !(getStyle() & WS_MAXIMIZE) )
     2221        if( !(getStyle() & WS_MAXIMIZE) ) {
    22202222             swp |= MinMaximize(SW_MAXIMIZE, &newPos );
     2223             fMinMaxChange = TRUE; //-> invalidate entire window in WM_CALCINVALIDRECT
     2224        }
    22212225        else swp |= SWP_NOSIZE | SWP_NOMOVE;
    22222226        break;
     
    22512255         if( getStyle() & (WS_MINIMIZE | WS_MAXIMIZE) ) {
    22522256              swp |= MinMaximize(SW_RESTORE, &newPos );
     2257              fMinMaxChange = TRUE; //-> invalidate entire window in WM_CALCINVALIDRECT
    22532258         }
    22542259         else swp |= SWP_NOSIZE | SWP_NOMOVE;
     
    22912296    }
    22922297END:
     2298    fMinMaxChange = FALSE;
    22932299    return wasVisible;
    22942300}
  • trunk/src/user32/win32wbase.h

    r5242 r5258  
    1 /* $Id: win32wbase.h,v 1.110 2001-02-22 10:37:31 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.111 2001-02-23 14:52:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    258258         //Window procedure type
    259259         BOOL   IsWindowUnicode();
     260         BOOL   IsMixMaxStateChanging()       { return fMinMaxChange; };
    260261
    261262         int    GetWindowTextLength();
     
    333334        HMENU   hSysMenu;
    334335        HWND    Win32Hwnd;
    335         BOOL    isUnicode;
    336336
    337337        int     posx, posy, width, height;
     
    353353        LONG    lastHitTestVal;         //Last value returned by WM_NCHITTEST handler
    354354
    355         BOOL    fFirstShow;
    356         BOOL    fIsDialog;
    357         BOOL    fIsModalDialog;
    358         BOOL    fIsModalDialogOwner;
    359355        HWND    OS2HwndModalDialog;
    360         BOOL    fInternalMsg;           //Used to distinguish between messages
    361                                         //sent by PM and those sent by apps
    362         BOOL    fNoSizeMsg;
    363         BOOL    fIsDestroyed;
    364         BOOL    fDestroyWindowCalled;   //DestroyWindow was called for this window
    365         BOOL    fCreated;
    366         BOOL    fCreationFinished;      //True when window or dialog has been created successfully
    367                                         //Needed to prevent DestroyWindow from deleting the window
    368                                         //object during construction
    369         BOOL    fTaskList;              //should be listed in PM tasklist or not
    370         BOOL    fXDefault;
    371         BOOL    fCXDefault;
    372         BOOL    fParentDC;
    373         BOOL    fComingToTop;
    374         BOOL    fCreateSetWindowPos;    //FALSE -> SetWindowPos in Win32BaseWindow::MsgCreate not yet called
     356
     357        unsigned fFirstShow:1;
     358        unsigned fIsDialog:1;
     359        unsigned fIsModalDialog:1;
     360        unsigned fIsModalDialogOwner:1;
     361        unsigned fInternalMsg:1;         //Used to distinguish between messages
     362                                         //sent by PM and those sent by apps
     363        unsigned fNoSizeMsg:1;
     364        unsigned fIsDestroyed:1;
     365        unsigned fDestroyWindowCalled:1; //DestroyWindow was called for this window
     366        unsigned fCreated:1;
     367        unsigned fCreationFinished:1;    //True when window or dialog has been created successfully
     368                                         //Needed to prevent DestroyWindow from deleting the window
     369                                         //object during construction
     370        unsigned fTaskList:1;            //should be listed in PM tasklist or not
     371        unsigned fXDefault:1;
     372        unsigned fCXDefault:1;
     373        unsigned fParentDC:1;
     374        unsigned fComingToTop:1;
     375        unsigned fCreateSetWindowPos:1;  //FALSE -> SetWindowPos in Win32BaseWindow::MsgCreate not yet called
     376        unsigned isUnicode:1;
     377        unsigned fMinMaxChange:1;        //set when switching between min/max/restored state
    375378
    376379        HRGN    hWindowRegion;
  • trunk/src/user32/win32wbasepos.cpp

    r5246 r5258  
    1 /* $Id: win32wbasepos.cpp,v 1.21 2001-02-22 18:18:59 sandervl Exp $ */
     1/* $Id: win32wbasepos.cpp,v 1.22 2001-02-23 14:52:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (nonclient/position methods)
     
    224224    hwndParent = GetParent(hwnd);
    225225    if(hwndParent == 0) {
    226         DebugInt3();
     226        dprintf(("WINPOS_FindIconPos: no parent found for window %x", hwnd));
    227227        return;
    228228    }
     
    269269            if (!hwndChild) /* No window was found, so it's OK for us */
    270270            {
    271                         pt.x = x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2;
    272                         pt.y = y - (yspacing + GetSystemMetrics(SM_CYICON)) / 2;
    273                         return;
    274             }
    275                 x += xspacing;
     271                pt.x = x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2;
     272                pt.y = y - (yspacing + GetSystemMetrics(SM_CYICON)) / 2;
     273                return;
     274            }
     275            x += xspacing;
    276276        } while(x <= rectParent.right-xspacing);
    277277
  • trunk/src/user32/win32wmdiclient.cpp

    r5217 r5258  
    1 /* $Id: win32wmdiclient.cpp,v 1.33 2001-02-20 17:22:06 sandervl Exp $ */
     1/* $Id: win32wmdiclient.cpp,v 1.34 2001-02-23 14:52:42 sandervl Exp $ */
    22/*
    33 * Win32 MDI Client Window Class for OS/2
     
    13291329    wndClass.cbClsExtra    = 0;
    13301330    wndClass.cbWndExtra    = 0;
    1331     wndClass.hCursor       = 0;
     1331    wndClass.hCursor       = LoadCursorA(0,IDC_ARROWA);;
    13321332    wndClass.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
    13331333    wndClass.lpszClassName = MDICLIENTCLASSNAMEA;
  • trunk/src/user32/windlg.cpp

    r5146 r5258  
    1 /* $Id: windlg.cpp,v 1.21 2001-02-17 14:49:26 sandervl Exp $ */
     1/* $Id: windlg.cpp,v 1.22 2001-02-23 14:52:42 sandervl Exp $ */
    22/*
    33 * Win32 dialog apis for OS/2
     
    695695        strcpy( temp, "A:\\" );
    696696        temp[0] += drive;
    697         lstrcpynA( temp + 3, DRIVE_GetDosCwd(curpath, drive), sizeof(temp)-3 );
     697        lstrcpynA( temp + 3, DRIVE_GetDosCwd(curpath, drive, sizeof(curpath)), sizeof(temp)-3 );
    698698        CharLowerA( temp );
    699699        /* Can't use PostMessage() here, because the string is on the stack */
Note: See TracChangeset for help on using the changeset viewer.