mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*CtrlCore: Win32 TopWindow SerializePlacement patched
git-svn-id: svn://ultimatepp.org/upp/trunk@4971 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
af247bce1c
commit
724914ff69
1 changed files with 2 additions and 20 deletions
|
|
@ -348,7 +348,7 @@ void TopWindow::SerializePlacement(Stream& s, bool reminimize)
|
|||
LLOG("minimized = " << mn << ", maximized = " << mx);
|
||||
LLOG("rect = " << rect << ", overlapped = " << overlapped);
|
||||
if(s.IsLoading()) {
|
||||
if(mn) rect = overlapped;
|
||||
rect = overlapped;
|
||||
Rect limit = GetVirtualWorkArea();
|
||||
Rect outer = rect;
|
||||
::AdjustWindowRect(outer, WS_OVERLAPPEDWINDOW, FALSE);
|
||||
|
|
@ -362,12 +362,11 @@ void TopWindow::SerializePlacement(Stream& s, bool reminimize)
|
|||
minmax(rect.top, limit.top, limit.bottom - sz.cy),
|
||||
sz.cx, sz.cy);
|
||||
state = OVERLAPPED;
|
||||
SetRect(rect);
|
||||
if(mn && reminimize)
|
||||
state = MINIMIZED;
|
||||
if(mx)
|
||||
state = MAXIMIZED;
|
||||
if(state == OVERLAPPED)
|
||||
SetRect(rect);
|
||||
if(IsOpen()) {
|
||||
WINDOWPLACEMENT wp;
|
||||
memset(&wp,0,sizeof(WINDOWPLACEMENT));
|
||||
|
|
@ -378,23 +377,6 @@ void TopWindow::SerializePlacement(Stream& s, bool reminimize)
|
|||
wp.rcNormalPosition.right=rect.right;
|
||||
wp.rcNormalPosition.bottom=rect.bottom;
|
||||
::SetWindowPlacement(GetHWND(),&wp);
|
||||
/*
|
||||
HWND hwnd = GetHWND();
|
||||
switch(state) {
|
||||
case MINIMIZED:
|
||||
if(!IsIconic(hwnd))
|
||||
::ShowWindow(hwnd, SW_MINIMIZE);
|
||||
break;
|
||||
case MAXIMIZED:
|
||||
if(!IsZoomed(hwnd))
|
||||
::ShowWindow(hwnd, SW_MAXIMIZE);
|
||||
break;
|
||||
default:
|
||||
if(IsIconic(hwnd) || IsZoomed(hwnd))
|
||||
::ShowWindow(hwnd, SW_RESTORE);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue