diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c index 3763ac5..6bb6712 100644 --- a/win32ss/user/ntuser/scrollbar.c +++ b/win32ss/user/ntuser/scrollbar.c @@ -488,20 +488,15 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) UINT new_flags; INT action = 0; PSBDATA pSBData; - DWORD OldPos = 0, CurrentPos = 0; + DWORD OldPos = 0; BOOL bChangeParams = FALSE; /* Don't show/hide scrollbar if params don't change */ UINT MaxPage; int MaxPos; - /* [0] = SB_HORZ, [1] = SB_VERT, [2] = SB_CTL */ - static PWND PrevHwnd[3] = { 0 }; - static DWORD PrevPos[3] = { 0 }; - static DWORD PrevMax[3] = { 0 }; - static INT PrevAction[3] = { 0 }; BOOL bVisible; ASSERT_REFS_CO(Window); - if(!SBID_IS_VALID(nBar)) /* Assures nBar is 0, 1, or 2 */ + if(!SBID_IS_VALID(nBar)) { EngSetLastError(ERROR_INVALID_PARAMETER); ERR("Trying to set scrollinfo for unknown scrollbar type %d\n", nBar); @@ -529,10 +524,10 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) Info = IntGetScrollInfoFromWindow(Window, nBar); pSBData = IntGetSBData(Window, nBar); - if (lpsi->fMask & SIF_THEMED && !(Info->fMask & SIF_THEMED)) - { - Info->fMask |= SIF_THEMED; - } +// if (lpsi->fMask & SIF_THEMED && !(Info->fMask & SIF_THEMED)) +// { +// Info->fMask |= SIF_THEMED; +// } /* Set the page size */ if (lpsi->fMask & SIF_PAGE) @@ -645,16 +640,6 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) } //done: - if ((Window != PrevHwnd[nBar]) || (action != PrevAction[nBar])) - { - if ((action == SA_SSI_SHOW) && (PrevAction[nBar] == SA_SSI_HIDE)) - { - co_UserShowScrollBar(Window, nBar, TRUE, TRUE); - } - } - if ((action != PrevAction[nBar]) && action != 0) - PrevAction[nBar] = action; - if ( action & SA_SSI_HIDE ) { co_UserShowScrollBar(Window, nBar, FALSE, FALSE); @@ -685,7 +670,6 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) { if (!(Info->fMask & SIF_THEMED)) /* Not Using Themes */ { - TRACE("Not using themes.\n"); if (action & SA_SSI_REPAINT_ARROWS) { // Redraw the entire bar. @@ -705,7 +689,6 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) else /* Using Themes */ { RECTL UpdateRect = psbi->rcScrollBar; - TRACE("Using themes.\n"); UpdateRect.left -= Window->rcClient.left - Window->rcWindow.left; UpdateRect.right -= Window->rcClient.left - Window->rcWindow.left; UpdateRect.top -= Window->rcClient.top - Window->rcWindow.top; @@ -724,28 +707,11 @@ 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 or lpsi->nMax */ - if ((Window != PrevHwnd[nBar]) || (CurrentPos != PrevPos[nBar]) || - (lpsi->nMax != PrevMax[nBar])) - { - co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); - PrevHwnd[nBar] = Window; - PrevPos[nBar] = CurrentPos; - PrevMax[nBar] = lpsi->nMax; - } +// if (bChangeParams) + co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); } - } // FIXME: Arrows -/* else if( action & SA_SSI_REPAINT_ARROWS ) - { - RECTL UpdateRect = psbi->rcScrollBar; - UpdateRect.left -= Window->rcClient.left - Window->rcWindow.left; - UpdateRect.right -= Window->rcClient.left - Window->rcWindow.left; - UpdateRect.top -= Window->rcClient.top - Window->rcWindow.top; - UpdateRect.bottom -= Window->rcClient.top - Window->rcWindow.top; - co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); } -*/ } + } if (bChangeParams && (nBar == SB_HORZ || nBar == SB_VERT) && (lpsi->fMask & SIF_DISABLENOSCROLL)) {