mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 04:36:40 +00:00
[WIN32K]
- Don't clip siblings in co_WinPosSetWindowPos when window has no WS_CLIPSIBLINGS style. Fixes ReactOS about box. - Commented out line with WS_CLIPCHILDREN support needs more work - Simplify co_WinPosSetWindowPos a bit svn path=/trunk/; revision=52332
This commit is contained in:
parent
ab19a2070b
commit
a757a65552
2 changed files with 20 additions and 20 deletions
|
@ -156,12 +156,12 @@ co_VIS_WindowLayoutChanged(
|
|||
|
||||
ASSERT_REFS_CO(Wnd);
|
||||
|
||||
Temp = IntSysCreateRectRgn(0, 0, 0, 0);
|
||||
NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
|
||||
|
||||
Parent = Wnd->spwndParent;
|
||||
if(Parent)
|
||||
{
|
||||
Temp = IntSysCreateRectRgn(0, 0, 0, 0);
|
||||
|
||||
NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
|
||||
NtGdiOffsetRgn(Temp,
|
||||
Wnd->rcWindow.left - Parent->rcClient.left,
|
||||
Wnd->rcWindow.top - Parent->rcClient.top);
|
||||
|
@ -171,8 +171,9 @@ co_VIS_WindowLayoutChanged(
|
|||
RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
|
||||
RDW_ALLCHILDREN);
|
||||
UserDerefObjectCo(Parent);
|
||||
}
|
||||
|
||||
GreDeleteObject(Temp);
|
||||
}
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -982,7 +982,6 @@ co_WinPosSetWindowPos(
|
|||
int RgnType;
|
||||
HDC Dc;
|
||||
RECTL CopyRect;
|
||||
RECTL TempRect;
|
||||
PWND Ancestor;
|
||||
|
||||
ASSERT_REFS_CO(Window);
|
||||
|
@ -1033,17 +1032,19 @@ co_WinPosSetWindowPos(
|
|||
if (!(WinPos.flags & SWP_NOREDRAW))
|
||||
{
|
||||
/* Compute the visible region before the window position is changed */
|
||||
if (!(WinPos.flags & (SWP_NOREDRAW | SWP_SHOWWINDOW)) &&
|
||||
if (!(WinPos.flags & SWP_SHOWWINDOW) &&
|
||||
(WinPos.flags & (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
|
||||
SWP_HIDEWINDOW | SWP_FRAMECHANGED)) !=
|
||||
(SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER))
|
||||
{
|
||||
VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE);
|
||||
VisBefore = VIS_ComputeVisibleRegion(Window, FALSE,
|
||||
FALSE, //(Window->style & WS_CLIPCHILDREN) ? TRUE : FALSE,
|
||||
(Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
|
||||
VisRgn = NULL;
|
||||
|
||||
if ( VisBefore != NULL &&
|
||||
(VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBefore, NULL)) &&
|
||||
REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION )
|
||||
REGION_Complexity(VisRgn) == NULLREGION )
|
||||
{
|
||||
RGNOBJAPI_Unlock(VisRgn);
|
||||
GreDeleteObject(VisBefore);
|
||||
|
@ -1084,7 +1085,7 @@ co_WinPosSetWindowPos(
|
|||
|
||||
/* FIXME: Actually do something with WVR_VALIDRECTS */
|
||||
|
||||
if ( NewClientRect.left != OldClientRect.left ||
|
||||
if (NewClientRect.left != OldClientRect.left ||
|
||||
NewClientRect.top != OldClientRect.top)
|
||||
{
|
||||
WinPosInternalMoveWindow(Window,
|
||||
|
@ -1095,7 +1096,7 @@ co_WinPosSetWindowPos(
|
|||
Window->rcWindow = NewWindowRect;
|
||||
Window->rcClient = NewClientRect;
|
||||
|
||||
if (!(WinPos.flags & SWP_SHOWWINDOW) && (WinPos.flags & SWP_HIDEWINDOW))
|
||||
if (WinPos.flags & SWP_HIDEWINDOW)
|
||||
{
|
||||
/* Clear the update region */
|
||||
co_UserRedrawWindow( Window,
|
||||
|
@ -1103,11 +1104,9 @@ co_WinPosSetWindowPos(
|
|||
0,
|
||||
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
|
||||
|
||||
if ((Window->style & WS_VISIBLE) &&
|
||||
Window->spwndParent == UserGetDesktopWindow())
|
||||
{
|
||||
if (Window->spwndParent == UserGetDesktopWindow())
|
||||
co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->head.h);
|
||||
}
|
||||
|
||||
Window->style &= ~WS_VISIBLE;
|
||||
}
|
||||
else if (WinPos.flags & SWP_SHOWWINDOW)
|
||||
|
@ -1130,12 +1129,14 @@ co_WinPosSetWindowPos(
|
|||
if (!(WinPos.flags & SWP_NOREDRAW))
|
||||
{
|
||||
/* Determine the new visible region */
|
||||
VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE);
|
||||
VisAfter = VIS_ComputeVisibleRegion(Window, FALSE,
|
||||
FALSE,//(Window->style & WS_CLIPCHILDREN) ? TRUE : FALSE,
|
||||
(Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
|
||||
VisRgn = NULL;
|
||||
|
||||
if ( VisAfter != NULL &&
|
||||
(VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisAfter, NULL)) &&
|
||||
REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION )
|
||||
REGION_Complexity(VisRgn) == NULLREGION )
|
||||
{
|
||||
RGNOBJAPI_Unlock(VisRgn);
|
||||
GreDeleteObject(VisAfter);
|
||||
|
@ -1309,15 +1310,13 @@ co_WinPosSetWindowPos(
|
|||
if (VisBefore != NULL)
|
||||
{
|
||||
ExposedRgn = IntSysCreateRectRgn(0, 0, 0, 0);
|
||||
NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
|
||||
RgnType = NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
|
||||
NtGdiOffsetRgn( ExposedRgn,
|
||||
OldWindowRect.left - NewWindowRect.left,
|
||||
OldWindowRect.top - NewWindowRect.top);
|
||||
|
||||
if (VisAfter != NULL)
|
||||
RgnType = NtGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF);
|
||||
else
|
||||
RgnType = SIMPLEREGION;
|
||||
|
||||
if (RgnType != ERROR && RgnType != NULLREGION)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue