Changeset 7734 for trunk/src


Ignore:
Timestamp:
Jan 7, 2002, 12:18:11 PM (24 years ago)
Author:
sandervl
Message:

fixed restoring of minimized or maximized window

Location:
trunk/src/user32
Files:
3 edited

Legend:

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

    r7691 r7734  
    1 /* $Id: pmwindow.cpp,v 1.166 2001-12-26 19:05:34 achimha Exp $ */
     1/* $Id: pmwindow.cpp,v 1.167 2002-01-07 11:18:10 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    10371037                 DWORD dwOldStyle = win32wnd->getOldStyle();
    10381038                 DWORD dwStyle    = win32wnd->getStyle();
    1039                  
     1039
     1040                 win32wnd->setOldStyle(dwStyle);
    10401041                 if((dwOldStyle & WS_MINIMIZE_W) && !(dwStyle & WS_MINIMIZE_W)) {
    10411042                     //SC_RESTORE -> SC_MINIMIZE
     1043                     dprintf(("%x -> SC_RESTORE -> SC_MINIMIZE", win32wnd->getWindowHandle()));
    10421044                     FrameReplaceMenuItem(WinWindowFromID(hwnd, FID_MINMAX), 0, SC_RESTORE, SC_MINIMIZE, hbmFrameMenu[0]);
     1045                     if(dwStyle & WS_MAXIMIZE_W) {
     1046                         //SC_MAXIMIZE -> SC_RESTORE
     1047                         dprintf(("%x -> SC_MAXIMIZE -> SC_RESTORE", win32wnd->getWindowHandle()));
     1048                         FrameReplaceMenuItem(WinWindowFromID(hwnd, FID_MINMAX), MIT_END, SC_MAXIMIZE, SC_RESTORE, hbmFrameMenu[2]);
     1049                     }
    10431050                 }
    10441051                 else
    10451052                 if((dwOldStyle & WS_MAXIMIZE_W) && !(dwStyle & WS_MAXIMIZE_W)) {
    10461053                     //SC_RESTORE -> SC_MAXIMIZE
     1054                     dprintf(("%x -> SC_RESTORE -> SC_MAXIMIZE", win32wnd->getWindowHandle()));
    10471055                     FrameReplaceMenuItem(WinWindowFromID(hwnd, FID_MINMAX), MIT_END, SC_RESTORE, SC_MAXIMIZE, hbmFrameMenu[1]);
    10481056                 }
     
    10501058                 if(!(dwOldStyle & WS_MINIMIZE_W) && (dwStyle & WS_MINIMIZE_W)) {
    10511059                     //SC_MINIMIZE -> SC_RESTORE
     1060                     dprintf(("%x -> SC_MINIMIZE -> SC_RESTORE", win32wnd->getWindowHandle()));
    10521061                     FrameReplaceMenuItem(WinWindowFromID(hwnd, FID_MINMAX), 0, SC_MINIMIZE, SC_RESTORE, hbmFrameMenu[2]);
    10531062                 }
     
    10551064                 if(!(dwOldStyle & WS_MAXIMIZE_W) && (dwStyle & WS_MAXIMIZE_W)) {
    10561065                     //SC_MAXIMIZE -> SC_RESTORE
     1066                     dprintf(("%x -> SC_MAXIMIZE -> SC_RESTORE", win32wnd->getWindowHandle()));
    10571067                     FrameReplaceMenuItem(WinWindowFromID(hwnd, FID_MINMAX), MIT_END, SC_MAXIMIZE, SC_RESTORE, hbmFrameMenu[2]);
    10581068                 }
  • trunk/src/user32/win32wbase.cpp

    r7708 r7734  
    1 /* $Id: win32wbase.cpp,v 1.308 2001-12-30 16:51:37 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.309 2002-01-07 11:18:10 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    26772677        NotifyFrameChanged(&wpos, &oldClientRect);
    26782678    }
     2679    if(!(getStyle() & (WS_MAXIMIZE|WS_MINIMIZE))) {
     2680        //Restore position always changes when the window position is changed
     2681        dprintf(("Save new restore position (%d,%d)(%d,%d)", rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
     2682        windowpos.rcNormalPosition = rectWindow;
     2683    }
    26792684    return (rc);
    26802685}
     
    27982803        /* SDK: ...valid only the next time... */
    27992804        if(wndpl->flags & WPF_RESTORETOMAXIMIZED)
    2800         setFlags(getFlags() | WIN_RESTORE_MAX);
     2805            setFlags(getFlags() | WIN_RESTORE_MAX);
    28012806   }
    28022807   return TRUE;
  • trunk/src/user32/win32wbase.h

    r7446 r7734  
    1 /* $Id: win32wbase.h,v 1.135 2001-11-24 13:55:14 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.136 2002-01-07 11:18:11 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    166166         ULONG  MsgGetTextLength();
    167167         void   MsgGetText(char *wndtext, ULONG textlength);
    168          VOID   updateWindowStyle(DWORD oldExStyle,DWORD oldStyle);
    169168
    170169virtual  LONG   SetWindowLong(int index, ULONG value, BOOL fUnicode);
     
    176175         DWORD  getOldStyle()                   { return dwOldStyle; };
    177176         void   setStyle(DWORD newstyle)        { dwStyle = newstyle; };
     177         void   setOldStyle(DWORD oldStyle)     { dwOldStyle = oldStyle; };
    178178         DWORD  getExStyle()                    { return dwExStyle; };
    179179         void   setExStyle(DWORD newexstyle)    { dwExStyle = newexstyle; };
     
    448448        ULONG   nrUserWindowBytes;
    449449
    450         RECT    rectWindow; //relative to parent
     450        RECT    rectWindow;  //relative to parent
    451451        RECT    rectClient;  //relative to frame
    452452WINDOWPLACEMENT windowpos;
Note: See TracChangeset for help on using the changeset viewer.