mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +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);
|
ASSERT_REFS_CO(Wnd);
|
||||||
|
|
||||||
Temp = IntSysCreateRectRgn(0, 0, 0, 0);
|
|
||||||
NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
|
|
||||||
|
|
||||||
Parent = Wnd->spwndParent;
|
Parent = Wnd->spwndParent;
|
||||||
if(Parent)
|
if(Parent)
|
||||||
{
|
{
|
||||||
|
Temp = IntSysCreateRectRgn(0, 0, 0, 0);
|
||||||
|
|
||||||
|
NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
|
||||||
NtGdiOffsetRgn(Temp,
|
NtGdiOffsetRgn(Temp,
|
||||||
Wnd->rcWindow.left - Parent->rcClient.left,
|
Wnd->rcWindow.left - Parent->rcClient.left,
|
||||||
Wnd->rcWindow.top - Parent->rcClient.top);
|
Wnd->rcWindow.top - Parent->rcClient.top);
|
||||||
|
@ -171,8 +171,9 @@ co_VIS_WindowLayoutChanged(
|
||||||
RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
|
RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
|
||||||
RDW_ALLCHILDREN);
|
RDW_ALLCHILDREN);
|
||||||
UserDerefObjectCo(Parent);
|
UserDerefObjectCo(Parent);
|
||||||
}
|
|
||||||
GreDeleteObject(Temp);
|
GreDeleteObject(Temp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -982,7 +982,6 @@ co_WinPosSetWindowPos(
|
||||||
int RgnType;
|
int RgnType;
|
||||||
HDC Dc;
|
HDC Dc;
|
||||||
RECTL CopyRect;
|
RECTL CopyRect;
|
||||||
RECTL TempRect;
|
|
||||||
PWND Ancestor;
|
PWND Ancestor;
|
||||||
|
|
||||||
ASSERT_REFS_CO(Window);
|
ASSERT_REFS_CO(Window);
|
||||||
|
@ -1033,17 +1032,19 @@ co_WinPosSetWindowPos(
|
||||||
if (!(WinPos.flags & SWP_NOREDRAW))
|
if (!(WinPos.flags & SWP_NOREDRAW))
|
||||||
{
|
{
|
||||||
/* Compute the visible region before the window position is changed */
|
/* 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 |
|
(WinPos.flags & (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
|
||||||
SWP_HIDEWINDOW | SWP_FRAMECHANGED)) !=
|
SWP_HIDEWINDOW | SWP_FRAMECHANGED)) !=
|
||||||
(SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER))
|
(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;
|
VisRgn = NULL;
|
||||||
|
|
||||||
if ( VisBefore != NULL &&
|
if ( VisBefore != NULL &&
|
||||||
(VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBefore, NULL)) &&
|
(VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBefore, NULL)) &&
|
||||||
REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION )
|
REGION_Complexity(VisRgn) == NULLREGION )
|
||||||
{
|
{
|
||||||
RGNOBJAPI_Unlock(VisRgn);
|
RGNOBJAPI_Unlock(VisRgn);
|
||||||
GreDeleteObject(VisBefore);
|
GreDeleteObject(VisBefore);
|
||||||
|
@ -1095,7 +1096,7 @@ co_WinPosSetWindowPos(
|
||||||
Window->rcWindow = NewWindowRect;
|
Window->rcWindow = NewWindowRect;
|
||||||
Window->rcClient = NewClientRect;
|
Window->rcClient = NewClientRect;
|
||||||
|
|
||||||
if (!(WinPos.flags & SWP_SHOWWINDOW) && (WinPos.flags & SWP_HIDEWINDOW))
|
if (WinPos.flags & SWP_HIDEWINDOW)
|
||||||
{
|
{
|
||||||
/* Clear the update region */
|
/* Clear the update region */
|
||||||
co_UserRedrawWindow( Window,
|
co_UserRedrawWindow( Window,
|
||||||
|
@ -1103,11 +1104,9 @@ co_WinPosSetWindowPos(
|
||||||
0,
|
0,
|
||||||
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
|
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
|
||||||
|
|
||||||
if ((Window->style & WS_VISIBLE) &&
|
if (Window->spwndParent == UserGetDesktopWindow())
|
||||||
Window->spwndParent == UserGetDesktopWindow())
|
|
||||||
{
|
|
||||||
co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->head.h);
|
co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->head.h);
|
||||||
}
|
|
||||||
Window->style &= ~WS_VISIBLE;
|
Window->style &= ~WS_VISIBLE;
|
||||||
}
|
}
|
||||||
else if (WinPos.flags & SWP_SHOWWINDOW)
|
else if (WinPos.flags & SWP_SHOWWINDOW)
|
||||||
|
@ -1130,12 +1129,14 @@ co_WinPosSetWindowPos(
|
||||||
if (!(WinPos.flags & SWP_NOREDRAW))
|
if (!(WinPos.flags & SWP_NOREDRAW))
|
||||||
{
|
{
|
||||||
/* Determine the new visible region */
|
/* 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;
|
VisRgn = NULL;
|
||||||
|
|
||||||
if ( VisAfter != NULL &&
|
if ( VisAfter != NULL &&
|
||||||
(VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisAfter, NULL)) &&
|
(VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisAfter, NULL)) &&
|
||||||
REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION )
|
REGION_Complexity(VisRgn) == NULLREGION )
|
||||||
{
|
{
|
||||||
RGNOBJAPI_Unlock(VisRgn);
|
RGNOBJAPI_Unlock(VisRgn);
|
||||||
GreDeleteObject(VisAfter);
|
GreDeleteObject(VisAfter);
|
||||||
|
@ -1309,15 +1310,13 @@ co_WinPosSetWindowPos(
|
||||||
if (VisBefore != NULL)
|
if (VisBefore != NULL)
|
||||||
{
|
{
|
||||||
ExposedRgn = IntSysCreateRectRgn(0, 0, 0, 0);
|
ExposedRgn = IntSysCreateRectRgn(0, 0, 0, 0);
|
||||||
NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
|
RgnType = NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
|
||||||
NtGdiOffsetRgn( ExposedRgn,
|
NtGdiOffsetRgn( ExposedRgn,
|
||||||
OldWindowRect.left - NewWindowRect.left,
|
OldWindowRect.left - NewWindowRect.left,
|
||||||
OldWindowRect.top - NewWindowRect.top);
|
OldWindowRect.top - NewWindowRect.top);
|
||||||
|
|
||||||
if (VisAfter != NULL)
|
if (VisAfter != NULL)
|
||||||
RgnType = NtGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF);
|
RgnType = NtGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF);
|
||||||
else
|
|
||||||
RgnType = SIMPLEREGION;
|
|
||||||
|
|
||||||
if (RgnType != ERROR && RgnType != NULLREGION)
|
if (RgnType != ERROR && RgnType != NULLREGION)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue