mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 11:46:50 +00:00
fixed minimize, restore/maximize bugs
svn path=/trunk/; revision=7195
This commit is contained in:
parent
ff1bec5cec
commit
96b1759d3d
3 changed files with 29 additions and 7 deletions
|
@ -22,4 +22,7 @@ WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT WinPoint,
|
|||
PWINDOW_OBJECT* Window);
|
||||
VOID FASTCALL WinPosActivateOtherWindow(PWINDOW_OBJECT Window);
|
||||
|
||||
PINTERNALPOS FASTCALL WinPosInitInternalPos(PWINDOW_OBJECT WindowObject,
|
||||
POINT pt, PRECT RestoreRect);
|
||||
|
||||
#endif /* _WIN32K_WINPOS_H */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: window.c,v 1.172 2003/12/23 08:48:59 navaraf Exp $
|
||||
/* $Id: window.c,v 1.173 2003/12/23 18:12:38 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -2644,6 +2644,8 @@ NtUserGetWindowPlacement(HWND hWnd,
|
|||
WINDOWPLACEMENT *lpwndpl)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
PINTERNALPOS InternalPos;
|
||||
POINT Size;
|
||||
WINDOWPLACEMENT Safepl;
|
||||
NTSTATUS Status;
|
||||
|
||||
|
@ -2669,11 +2671,21 @@ NtUserGetWindowPlacement(HWND hWnd,
|
|||
|
||||
Safepl.flags = 0;
|
||||
Safepl.showCmd = ((WindowObject->Flags & WINDOWOBJECT_RESTOREMAX) ? SW_MAXIMIZE : SW_SHOWNORMAL);
|
||||
if (WindowObject->InternalPos)
|
||||
|
||||
Size.x = WindowObject->WindowRect.left;
|
||||
Size.y = WindowObject->WindowRect.top;
|
||||
InternalPos = WinPosInitInternalPos(WindowObject, Size,
|
||||
&WindowObject->WindowRect);
|
||||
if (InternalPos)
|
||||
{
|
||||
Safepl.rcNormalPosition = WindowObject->InternalPos->NormalRect;
|
||||
Safepl.ptMinPosition = WindowObject->InternalPos->IconPos;
|
||||
Safepl.ptMaxPosition = WindowObject->InternalPos->MaxPos;
|
||||
Safepl.rcNormalPosition = InternalPos->NormalRect;
|
||||
Safepl.ptMinPosition = InternalPos->IconPos;
|
||||
Safepl.ptMaxPosition = InternalPos->MaxPos;
|
||||
}
|
||||
else
|
||||
{
|
||||
IntReleaseWindowObject(WindowObject);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = MmCopyToCaller(lpwndpl, &Safepl, sizeof(WINDOWPLACEMENT));
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: winpos.c,v 1.63 2003/12/23 17:56:55 weiden Exp $
|
||||
/* $Id: winpos.c,v 1.64 2003/12/23 18:12:38 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -165,7 +165,7 @@ WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show)
|
|||
return(FALSE);
|
||||
}
|
||||
|
||||
PINTERNALPOS STATIC STDCALL
|
||||
PINTERNALPOS FASTCALL
|
||||
WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect)
|
||||
{
|
||||
INT XInc, YInc;
|
||||
|
@ -293,6 +293,13 @@ WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos)
|
|||
InternalPos->MaxPos.y, Size.x, Size.y);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
*NewPos = InternalPos->NormalRect;
|
||||
NewPos->right -= NewPos->left;
|
||||
NewPos->bottom -= NewPos->top;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue