mirror of
https://github.com/reactos/reactos.git
synced 2024-07-05 12:15:46 +00:00
[Win32k]
- Patch by Huw Campbell : Fixes maximizing Explorer window, the horizontal scroll bar is not painted correctly. See CORE-6249. svn path=/trunk/; revision=63215
This commit is contained in:
parent
5984090c7b
commit
9f8fa2af13
|
@ -1710,6 +1710,7 @@ co_WinPosSetWindowPos(
|
||||||
RECTL valid_rects[2];
|
RECTL valid_rects[2];
|
||||||
PROSRGNDATA VisRgn;
|
PROSRGNDATA VisRgn;
|
||||||
HRGN VisBefore = NULL;
|
HRGN VisBefore = NULL;
|
||||||
|
HRGN VisBeforeJustClient = NULL;
|
||||||
HRGN VisAfter = NULL;
|
HRGN VisAfter = NULL;
|
||||||
HRGN DirtyRgn = NULL;
|
HRGN DirtyRgn = NULL;
|
||||||
HRGN ExposedRgn = NULL;
|
HRGN ExposedRgn = NULL;
|
||||||
|
@ -1806,6 +1807,28 @@ co_WinPosSetWindowPos(
|
||||||
RGNOBJAPI_Unlock(VisRgn);
|
RGNOBJAPI_Unlock(VisRgn);
|
||||||
NtGdiOffsetRgn(VisBefore, -Window->rcWindow.left, -Window->rcWindow.top);
|
NtGdiOffsetRgn(VisBefore, -Window->rcWindow.left, -Window->rcWindow.top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Calculate the non client area for resizes, as this is used in the copy region */
|
||||||
|
if (!(WinPos.flags & SWP_NOSIZE))
|
||||||
|
{
|
||||||
|
VisBeforeJustClient = VIS_ComputeVisibleRegion(Window, TRUE, FALSE,
|
||||||
|
(Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
|
||||||
|
VisRgn = NULL;
|
||||||
|
|
||||||
|
if ( VisBeforeJustClient != NULL &&
|
||||||
|
(VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBeforeJustClient, NULL)) &&
|
||||||
|
REGION_Complexity(VisRgn) == NULLREGION )
|
||||||
|
{
|
||||||
|
RGNOBJAPI_Unlock(VisRgn);
|
||||||
|
GreDeleteObject(VisBeforeJustClient);
|
||||||
|
VisBeforeJustClient = NULL;
|
||||||
|
}
|
||||||
|
else if(VisRgn)
|
||||||
|
{
|
||||||
|
RGNOBJAPI_Unlock(VisRgn);
|
||||||
|
NtGdiOffsetRgn(VisBeforeJustClient, -Window->rcWindow.left, -Window->rcWindow.top);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1909,8 +1932,6 @@ co_WinPosSetWindowPos(
|
||||||
((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) &&
|
((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) &&
|
||||||
!(Window->ExStyle & WS_EX_TRANSPARENT) )
|
!(Window->ExStyle & WS_EX_TRANSPARENT) )
|
||||||
{
|
{
|
||||||
CopyRgn = IntSysCreateRectRgn(0, 0, 0, 0);
|
|
||||||
RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is (also) a window resize, the whole nonclient area
|
* If this is (also) a window resize, the whole nonclient area
|
||||||
|
@ -1920,19 +1941,14 @@ co_WinPosSetWindowPos(
|
||||||
* we don't have to crop (can't take anything away from an empty
|
* we don't have to crop (can't take anything away from an empty
|
||||||
* region...)
|
* region...)
|
||||||
*/
|
*/
|
||||||
if (!(WinPos.flags & SWP_NOSIZE) &&
|
|
||||||
RgnType != ERROR &&
|
CopyRgn = IntSysCreateRectRgn(0, 0, 0, 0);
|
||||||
RgnType != NULLREGION )
|
if (WinPos.flags & SWP_NOSIZE)
|
||||||
|
RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);
|
||||||
|
else if (VisBeforeJustClient != NULL)
|
||||||
{
|
{
|
||||||
PROSRGNDATA pCopyRgn;
|
RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND);
|
||||||
RECTL ORect = OldClientRect;
|
GreDeleteObject(VisBeforeJustClient);
|
||||||
RECTL NRect = NewClientRect;
|
|
||||||
RECTL_vOffsetRect(&ORect, - OldWindowRect.left, - OldWindowRect.top);
|
|
||||||
RECTL_vOffsetRect(&NRect, - NewWindowRect.left, - NewWindowRect.top);
|
|
||||||
RECTL_bIntersectRect(&CopyRect, &ORect, &NRect);
|
|
||||||
pCopyRgn = RGNOBJAPI_Lock(CopyRgn, NULL);
|
|
||||||
REGION_CropAndOffsetRegion(pCopyRgn, pCopyRgn, &CopyRect, NULL);
|
|
||||||
RGNOBJAPI_Unlock(pCopyRgn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No use in copying bits which are in the update region. */
|
/* No use in copying bits which are in the update region. */
|
||||||
|
|
Loading…
Reference in a new issue