mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
[NTUSER] Don't redraw scrollbar if it is hidden (#4849)
Fix redrawing bug on Command Prompt. CORE-18593
This commit is contained in:
parent
3fc6d90c58
commit
0484beb04b
1 changed files with 19 additions and 1 deletions
|
@ -497,6 +497,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
|||
static DWORD PrevPos[3] = { 0 };
|
||||
static DWORD PrevMax[3] = { 0 };
|
||||
static INT PrevAction[3] = { 0 };
|
||||
BOOL bVisible;
|
||||
|
||||
ASSERT_REFS_CO(Window);
|
||||
|
||||
|
@ -663,7 +664,24 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
|||
if ( action & SA_SSI_SHOW )
|
||||
if ( co_UserShowScrollBar(Window, nBar, TRUE, TRUE) )
|
||||
return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos; /* SetWindowPos() already did the painting */
|
||||
if (bRedraw)
|
||||
|
||||
switch (nBar)
|
||||
{
|
||||
case SB_HORZ:
|
||||
bVisible = (Window->style & WS_HSCROLL);
|
||||
break;
|
||||
case SB_VERT:
|
||||
bVisible = (Window->style & WS_VSCROLL);
|
||||
break;
|
||||
case SB_CTL:
|
||||
bVisible = (Window->style & WS_VISIBLE);
|
||||
break;
|
||||
default:
|
||||
bVisible = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (bRedraw && bVisible)
|
||||
{
|
||||
if (!(Info->fMask & SIF_THEMED)) /* Not Using Themes */
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue