mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Bug fixes.
- NtUserDestroyWindow should destroy owned popup windows (Fixes some problems with Explorer menus). - Changed WinPosSetWindowPos to take coordinates relative to parent, because it is used as such everywhere. svn path=/trunk/; revision=7734
This commit is contained in:
parent
faaee8fe61
commit
bffadccb2c
4 changed files with 14 additions and 46 deletions
|
@ -9,6 +9,8 @@
|
|||
|
||||
VOID FASTCALL
|
||||
IntValidateParent(PWINDOW_OBJECT Child, HRGN ValidRegion);
|
||||
VOID FASTCALL
|
||||
IntValidateSiblings(PWINDOW_OBJECT Child, HRGN ValidRegion);
|
||||
BOOL FASTCALL
|
||||
IntRedrawWindow(PWINDOW_OBJECT Wnd, const RECT* UpdateRect, HRGN UpdateRgn, ULONG Flags);
|
||||
BOOL FASTCALL
|
||||
|
|
|
@ -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: painting.c,v 1.62 2004/01/17 15:18:25 navaraf Exp $
|
||||
* $Id: painting.c,v 1.63 2004/01/18 08:29:31 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -270,8 +270,7 @@ IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags)
|
|||
*/
|
||||
|
||||
VOID FASTCALL
|
||||
IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags,
|
||||
BOOL ValidateParent)
|
||||
IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||
{
|
||||
INT RgnType;
|
||||
BOOL HadPaintMessage, HadNCPaintMessage;
|
||||
|
@ -364,15 +363,6 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags,
|
|||
Window->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate parent covered by region
|
||||
*/
|
||||
|
||||
if (ValidateParent)
|
||||
{
|
||||
IntValidateParent(Window, Window->UpdateRegion);
|
||||
}
|
||||
|
||||
/*
|
||||
* Split the nonclient update region.
|
||||
*/
|
||||
|
@ -418,7 +408,7 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags,
|
|||
NtGdiOffsetRgn(hRgnTemp,
|
||||
Window->WindowRect.left - Child->WindowRect.left,
|
||||
Window->WindowRect.top - Child->WindowRect.top);
|
||||
IntInvalidateWindows(Child, hRgnTemp, Flags, FALSE);
|
||||
IntInvalidateWindows(Child, hRgnTemp, Flags);
|
||||
NtGdiDeleteObject(hRgnTemp);
|
||||
}
|
||||
IntReleaseWindowObject(Child);
|
||||
|
@ -546,13 +536,7 @@ IntRedrawWindow(PWINDOW_OBJECT Window, const RECT* UpdateRect, HRGN UpdateRgn,
|
|||
|
||||
if (Flags & (RDW_INVALIDATE | RDW_VALIDATE | RDW_INTERNALPAINT | RDW_NOINTERNALPAINT))
|
||||
{
|
||||
IntInvalidateWindows(Window, hRgn, Flags, TRUE);
|
||||
} else
|
||||
if (Window->UpdateRegion != NULL && (Flags & (RDW_ERASENOW | RDW_UPDATENOW)))
|
||||
{
|
||||
/* Validate parent covered by region. */
|
||||
IntValidateParent(Window, Window->UpdateRegion);
|
||||
IntValidateParent(Window, Window->NCUpdateRegion);
|
||||
IntInvalidateWindows(Window, hRgn, Flags);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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.176 2004/01/17 15:18:25 navaraf Exp $
|
||||
/* $Id: window.c,v 1.177 2004/01/18 08:29:31 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1555,7 +1555,6 @@ NtUserDestroyWindow(HWND Wnd)
|
|||
}
|
||||
|
||||
/* Recursively destroy owned windows */
|
||||
#if 0 /* FIXME */
|
||||
if (! isChild)
|
||||
{
|
||||
for (;;)
|
||||
|
@ -1573,6 +1572,10 @@ NtUserDestroyWindow(HWND Wnd)
|
|||
for (ChildHandle = Children; *ChildHandle; ++ChildHandle)
|
||||
{
|
||||
Child = IntGetWindowObject(*ChildHandle);
|
||||
if (Child == NULL)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (Child->Owner != Window)
|
||||
{
|
||||
continue;
|
||||
|
@ -1599,7 +1602,6 @@ NtUserDestroyWindow(HWND Wnd)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!IntIsWindow(Wnd))
|
||||
{
|
||||
|
@ -3112,23 +3114,6 @@ NtUserSetWindowPos(
|
|||
int cy,
|
||||
UINT uFlags)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
|
||||
WindowObject = IntGetWindowObject(hWnd);
|
||||
if (WindowObject == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (WindowObject->Style & WS_CHILD)
|
||||
{
|
||||
X += WindowObject->Parent->ClientRect.left;
|
||||
Y += WindowObject->Parent->ClientRect.top;
|
||||
}
|
||||
|
||||
IntReleaseWindowObject(WindowObject);
|
||||
|
||||
return WinPosSetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags);
|
||||
}
|
||||
|
||||
|
|
|
@ -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.81 2004/01/17 15:18:25 navaraf Exp $
|
||||
/* $Id: winpos.c,v 1.82 2004/01/18 08:29:31 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -268,6 +268,8 @@ WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos)
|
|||
{
|
||||
WinPosGetMinMaxInfo(WindowObject, &Size, &InternalPos->MaxPos,
|
||||
NULL, NULL);
|
||||
DPRINT1("Maximize: %d,%d %dx%d\n",
|
||||
InternalPos->MaxPos.x, InternalPos->MaxPos.y, Size.x, Size.y);
|
||||
if (WindowObject->Style & WS_MINIMIZE)
|
||||
{
|
||||
WindowObject->Style &= ~WS_MINIMIZE;
|
||||
|
@ -757,11 +759,6 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
WinPos.cx = cx;
|
||||
WinPos.cy = cy;
|
||||
WinPos.flags = flags;
|
||||
if (Window->Style & WS_CHILD)
|
||||
{
|
||||
WinPos.x -= Window->Parent->ClientRect.left;
|
||||
WinPos.y -= Window->Parent->ClientRect.top;
|
||||
}
|
||||
|
||||
WinPosDoWinPosChanging(Window, &WinPos, &NewWindowRect, &NewClientRect);
|
||||
|
||||
|
|
Loading…
Reference in a new issue