mirror of
https://github.com/reactos/reactos.git
synced 2025-07-12 17:44:12 +00:00
[0.4.11][WIN32SS][COMCTL32][BROWSEUI] Fix multiple scrollbar redraw issues
This fixes: - CORE-15911 "Scrollbars do not disappear when Maximizing and not needed" - CORE-10617 "ListView corrupt scrollbar upon resizing the column-header" and fixes regressions: - CORE-15429 "Uninitialized scrollbars in 'My Computer' permanently drawn" - CORE-16466 "Uninitialized scrollbars in 'My Computer' do still flash up for a fraction of a second before getting overpainted" both unhidden by SVN r75735 == git 0.4.7-dev-168-g6af37fd54e
by porting back the commits: 0.4.14-dev-312-gb931f643e3
0.4.13-dev-535-g1158c24194
this package supersedes and allows us to undo the temporary workaround in browseui that we used exclusively for 0.4.11: 0.4.11-RC-19-g7fd1b51e8d
This commit is contained in:
parent
8041a7e161
commit
aa7844e519
3 changed files with 31 additions and 4 deletions
|
@ -1005,7 +1005,6 @@ HRESULT CShellBrowser::BrowseToPath(IShellFolder *newShellFolder,
|
||||||
if (previousView == NULL)
|
if (previousView == NULL)
|
||||||
{
|
{
|
||||||
RepositionBars();
|
RepositionBars();
|
||||||
RepositionBars();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// no use
|
// no use
|
||||||
|
|
|
@ -2076,6 +2076,9 @@ static INT LISTVIEW_UpdateHScroll(LISTVIEW_INFO *infoPtr)
|
||||||
|
|
||||||
horzInfo.fMask = SIF_RANGE | SIF_PAGE;
|
horzInfo.fMask = SIF_RANGE | SIF_PAGE;
|
||||||
horzInfo.nMax = max(horzInfo.nMax - 1, 0);
|
horzInfo.nMax = max(horzInfo.nMax - 1, 0);
|
||||||
|
#ifdef __REACTOS__ /* CORE-16466 part 1 of 4 */
|
||||||
|
horzInfo.nMax = (horzInfo.nPage == 0 ? 0 : horzInfo.nMax);
|
||||||
|
#endif
|
||||||
dx = GetScrollPos(infoPtr->hwndSelf, SB_HORZ);
|
dx = GetScrollPos(infoPtr->hwndSelf, SB_HORZ);
|
||||||
dx -= SetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &horzInfo, TRUE);
|
dx -= SetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &horzInfo, TRUE);
|
||||||
TRACE("horzInfo=%s\n", debugscrollinfo(&horzInfo));
|
TRACE("horzInfo=%s\n", debugscrollinfo(&horzInfo));
|
||||||
|
@ -2099,10 +2102,27 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr)
|
||||||
|
|
||||||
ZeroMemory(&vertInfo, sizeof(SCROLLINFO));
|
ZeroMemory(&vertInfo, sizeof(SCROLLINFO));
|
||||||
vertInfo.cbSize = sizeof(SCROLLINFO);
|
vertInfo.cbSize = sizeof(SCROLLINFO);
|
||||||
|
#ifdef __REACTOS__ /* CORE-16466 part 2 of 4 */
|
||||||
|
vertInfo.nPage = max((infoPtr->rcList.bottom - infoPtr->rcList.top), 0);
|
||||||
|
#else
|
||||||
vertInfo.nPage = infoPtr->rcList.bottom - infoPtr->rcList.top;
|
vertInfo.nPage = infoPtr->rcList.bottom - infoPtr->rcList.top;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (infoPtr->uView == LV_VIEW_DETAILS)
|
if (infoPtr->uView == LV_VIEW_DETAILS)
|
||||||
{
|
{
|
||||||
|
#ifdef __REACTOS__ /* CORE-16466 part 3 of 4 */
|
||||||
|
if (vertInfo.nPage != 0)
|
||||||
|
{
|
||||||
|
vertInfo.nMax = infoPtr->nItemCount;
|
||||||
|
|
||||||
|
/* scroll by at least one page */
|
||||||
|
if (vertInfo.nPage < infoPtr->nItemHeight)
|
||||||
|
vertInfo.nPage = infoPtr->nItemHeight;
|
||||||
|
|
||||||
|
if (infoPtr->nItemHeight > 0)
|
||||||
|
vertInfo.nPage /= infoPtr->nItemHeight;
|
||||||
|
}
|
||||||
|
#else
|
||||||
vertInfo.nMax = infoPtr->nItemCount;
|
vertInfo.nMax = infoPtr->nItemCount;
|
||||||
|
|
||||||
/* scroll by at least one page */
|
/* scroll by at least one page */
|
||||||
|
@ -2111,6 +2131,7 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr)
|
||||||
|
|
||||||
if (infoPtr->nItemHeight > 0)
|
if (infoPtr->nItemHeight > 0)
|
||||||
vertInfo.nPage /= infoPtr->nItemHeight;
|
vertInfo.nPage /= infoPtr->nItemHeight;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (infoPtr->uView != LV_VIEW_LIST) /* LV_VIEW_ICON, or LV_VIEW_SMALLICON */
|
else if (infoPtr->uView != LV_VIEW_LIST) /* LV_VIEW_ICON, or LV_VIEW_SMALLICON */
|
||||||
{
|
{
|
||||||
|
@ -2121,6 +2142,9 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr)
|
||||||
|
|
||||||
vertInfo.fMask = SIF_RANGE | SIF_PAGE;
|
vertInfo.fMask = SIF_RANGE | SIF_PAGE;
|
||||||
vertInfo.nMax = max(vertInfo.nMax - 1, 0);
|
vertInfo.nMax = max(vertInfo.nMax - 1, 0);
|
||||||
|
#ifdef __REACTOS__ /* CORE-16466 part 4 of 4 */
|
||||||
|
vertInfo.nMax = (vertInfo.nPage == 0 ? 0 : vertInfo.nMax);
|
||||||
|
#endif
|
||||||
dy = GetScrollPos(infoPtr->hwndSelf, SB_VERT);
|
dy = GetScrollPos(infoPtr->hwndSelf, SB_VERT);
|
||||||
dy -= SetScrollInfo(infoPtr->hwndSelf, SB_VERT, &vertInfo, TRUE);
|
dy -= SetScrollInfo(infoPtr->hwndSelf, SB_VERT, &vertInfo, TRUE);
|
||||||
TRACE("vertInfo=%s\n", debugscrollinfo(&vertInfo));
|
TRACE("vertInfo=%s\n", debugscrollinfo(&vertInfo));
|
||||||
|
|
|
@ -1778,7 +1778,7 @@ co_WinPosSetWindowPos(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the non client area for resizes, as this is used in the copy region */
|
/* Calculate the non client area for resizes, as this is used in the copy region */
|
||||||
if (!(WinPos.flags & SWP_NOSIZE))
|
if ((WinPos.flags & (SWP_NOSIZE | SWP_FRAMECHANGED)) != SWP_NOSIZE)
|
||||||
{
|
{
|
||||||
VisBeforeJustClient = VIS_ComputeVisibleRegion(Window, TRUE, FALSE,
|
VisBeforeJustClient = VIS_ComputeVisibleRegion(Window, TRUE, FALSE,
|
||||||
(Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
|
(Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
|
||||||
|
@ -1916,11 +1916,15 @@ co_WinPosSetWindowPos(
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CopyRgn = IntSysCreateRectpRgn(0, 0, 0, 0);
|
CopyRgn = IntSysCreateRectpRgn(0, 0, 0, 0);
|
||||||
if (WinPos.flags & SWP_NOSIZE)
|
if ((WinPos.flags & SWP_NOSIZE) && (WinPos.flags & SWP_NOCLIENTSIZE))
|
||||||
RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);
|
RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);
|
||||||
else if (VisBeforeJustClient != NULL)
|
else if (VisBeforeJustClient != NULL)
|
||||||
{
|
{
|
||||||
RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND);
|
RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (VisBeforeJustClient != NULL)
|
||||||
|
{
|
||||||
REGION_Delete(VisBeforeJustClient);
|
REGION_Delete(VisBeforeJustClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue