Ignore:
Timestamp:
Nov 20, 2002, 1:59:06 PM (23 years ago)
Author:
sandervl
Message:

Ignore size changes when a window is minimized; save them for restore

File:
1 edited

Legend:

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

    r9345 r9418  
    1 /* $Id: win32wbase.cpp,v 1.342 2002-10-15 09:18:10 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.343 2002-11-20 12:59:06 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    23442344
    23452345    if (!(getStyle() & WS_MINIMIZE)) {
    2346          SetWindowPos(HWND_TOP, newPos.left, newPos.top, newPos.right, newPos.bottom, LOWORD(swp));
     2346         SetWindowPos(HWND_TOP, newPos.left, newPos.top, newPos.right, newPos.bottom, LOWORD(swp), TRUE);
    23472347    }
    23482348    else OSLibWinMinimizeWindow(getOS2FrameWindowHandle());
     
    23792379    }
    23802380//testestest
     2381
    23812382END:
    23822383    fMinMaxChange = FALSE;
     
    23852386//******************************************************************************
    23862387//******************************************************************************
    2387 BOOL Win32BaseWindow::SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags)
     2388BOOL Win32BaseWindow::SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx,
     2389                                   int cy, UINT fuFlags, BOOL fShowWindow)
    23882390{
    23892391   BOOL rc = FALSE;
     
    24932495        OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
    24942496    }
     2497    if((dwOldStyle & WS_MINIMIZE) && (getStyle() & WS_MINIMIZE))
     2498    {//don't allow size changes if the window is minimized
     2499     //we will update the restore position at the end of this method
     2500        if(!(wpos.flags & SWP_NOSIZE)) {
     2501            wpos.flags |= SWP_NOSIZE;
     2502            rectWindow.right  = rectWindow.left + wpos.cx;
     2503            rectWindow.bottom = rectWindow.top + wpos.cy;
     2504        }
     2505    }
    24952506
    24962507    if(getParent()) {
     
    25052516        {
    25062517            NotifyFrameChanged(&wpos, &oldClientRect);
     2518        }
     2519        if(!fShowWindow)
     2520        {
     2521            //Restore position always changes when the window position is changed
     2522            dprintf(("Save new restore position (%d,%d)(%d,%d)", rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
     2523            windowpos.rcNormalPosition = rectWindow;
    25072524        }
    25082525        return TRUE;
     
    25402557    }
    25412558    dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl));
     2559
    25422560    rc = OSLibWinSetMultWindowPos(&swp, 1);
    2543 
    25442561    if(rc == FALSE)
    25452562    {
     
    25522569        NotifyFrameChanged(&wpos, &oldClientRect);
    25532570    }
    2554     if(!(getStyle() & (WS_MAXIMIZE|WS_MINIMIZE))) {
     2571    if(!fShowWindow)
     2572    {
    25552573        //Restore position always changes when the window position is changed
    25562574        dprintf(("Save new restore position (%d,%d)(%d,%d)", rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
Note: See TracChangeset for help on using the changeset viewer.