mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTUSER] Improve Themed Scrollbars by Minimizing Updates (#3953)
This fixes regressions CORE-17754 and CORE-17755 which regressed by
0.4.15-dev-3086-g 236649c626
This commit is contained in:
parent
6e9ff14e26
commit
3bf7e3ac13
1 changed files with 12 additions and 2 deletions
|
@ -488,10 +488,13 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
|||
UINT new_flags;
|
||||
INT action = 0;
|
||||
PSBDATA pSBData;
|
||||
DWORD OldPos = 0;
|
||||
DWORD OldPos = 0, CurrentPos = 0;
|
||||
BOOL bChangeParams = FALSE; /* Don't show/hide scrollbar if params don't change */
|
||||
UINT MaxPage;
|
||||
int MaxPos;
|
||||
/* [0] = HORZ, [1] = VERT */
|
||||
static PWND PrevHwnd[2] = { 0 };
|
||||
static DWORD PrevPos[2] = { 0 };
|
||||
|
||||
ASSERT_REFS_CO(Window);
|
||||
|
||||
|
@ -686,7 +689,14 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
|||
UpdateRect.bottom -= psbi->dxyLineButton;
|
||||
}
|
||||
}
|
||||
CurrentPos = lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos;
|
||||
/* Check for changes to Window or CurrentPos */
|
||||
if ((Window != PrevHwnd[nBar]) || (CurrentPos != PrevPos[nBar]))
|
||||
{
|
||||
co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME);
|
||||
PrevHwnd[nBar] = Window;
|
||||
PrevPos[nBar] = CurrentPos;
|
||||
}
|
||||
}
|
||||
} // FIXME: Arrows
|
||||
/* else if( action & SA_SSI_REPAINT_ARROWS )
|
||||
|
|
Loading…
Reference in a new issue