mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 05:31:21 +00:00
[0.4.11] Update Scrollbar code to state of master 2023-March-12
by porting back: 0.4.15-dev-5784-g2aea4ab945
[NTUSER] Scrollbar.c pure whitespace fixes 0.4.15-dev-5680-g5ad5737370
CORE-18050 [NTUSER] Delete temporary workarounds in co_IntSetScrollInfo() (#4985) 0.4.15-dev-5355-g0484beb04b
CORE-18593 [NTUSER] Don't redraw scrollbar if it is hidden command prompt (#4849) 0.4.15-dev-4492-g03422451b3
Add '\n' to debug logs (partially, only the scrollbar.c part) 0.4.15-dev-3875-g977c129f33
CORE-18048 [USER32] SetScrollPos should not bypass UserApiHook (#4372) 0.4.15-dev-3849-gfd28a69de6
CORE-17780 [WIN32SS] Store the scrollbar theming enabled flag in the scrollbar (#4367) 0.4.15-dev-3175-g222acf5a3e
CORE-17777 [NTUSER] Scrollbar.c, Avoid potential out-of-bounds-accesses in co_IntSetScrollInfo() 0.4.15-dev-3174-gdda9c3979e
CORE-17769 'Rapps Listview manual resize may erroneously not draw the triangles sometimes' 0.4.15-dev-3147-g3bf7e3ac13
CORE-17754 and CORE-17755 [NTUSER] Improve Themed Scrollbars by Minimizing Updates (#3953) 0.4.15-dev-3086-g236649c626
CORE-16375 [UXTHEME][NTUSER] Fix flashing of scrollbar when scrolling (#3868) 0.4.15-dev-2375-gffea5152e6
[WIN32SS][NTUSER] Fix an integer underflow within scrollbar info setting 0.4.14-dev-1134-g00adb1a3f9
[WIN32SS] Improve Drawing Scrollbars - CORE-14755 fixed, flashing scrollbar triangles (we know 131 affected apps just from rapps!) - CORE-13931 fixed, FamiTracker invisible about-dlg - CORE-14685 improves a bit, but is not entirely fixed - CORE-11561 'Notepad scrollbars problem' fixed This will also speed up NSIS installers that display their file-copy-progress by a self-scrolling listview.
This commit is contained in:
parent
14e4939dc4
commit
0eb86c9990
4 changed files with 269 additions and 300 deletions
|
@ -571,6 +571,29 @@ dodefault:
|
||||||
return g_user32ApiHook.GetScrollInfo(hwnd, fnBar, lpsi);
|
return g_user32ApiHook.GetScrollInfo(hwnd, fnBar, lpsi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INT WINAPI ThemeSetScrollInfo(HWND hWnd, int fnBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
||||||
|
{
|
||||||
|
PWND_DATA pwndData;
|
||||||
|
SCROLLINFO siout;
|
||||||
|
LPSCROLLINFO lpsiout = &siout;
|
||||||
|
BOOL IsThemed = FALSE;
|
||||||
|
|
||||||
|
pwndData = ThemeGetWndData(hWnd);
|
||||||
|
|
||||||
|
if (!pwndData)
|
||||||
|
goto dodefault;
|
||||||
|
|
||||||
|
if (pwndData->hthemeScrollbar)
|
||||||
|
IsThemed = TRUE;
|
||||||
|
|
||||||
|
memcpy(&siout, lpsi, sizeof(SCROLLINFO));
|
||||||
|
if (IsThemed)
|
||||||
|
siout.fMask |= SIF_THEMED;
|
||||||
|
|
||||||
|
dodefault:
|
||||||
|
return g_user32ApiHook.SetScrollInfo(hWnd, fnBar, lpsiout, bRedraw);
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Exports
|
* Exports
|
||||||
*/
|
*/
|
||||||
|
@ -606,6 +629,7 @@ ThemeInitApiHook(UAPIHK State, PUSERAPIHOOK puah)
|
||||||
|
|
||||||
puah->SetWindowRgn = ThemeSetWindowRgn;
|
puah->SetWindowRgn = ThemeSetWindowRgn;
|
||||||
puah->GetScrollInfo = ThemeGetScrollInfo;
|
puah->GetScrollInfo = ThemeGetScrollInfo;
|
||||||
|
puah->SetScrollInfo = ThemeSetScrollInfo;
|
||||||
|
|
||||||
UAH_HOOK_MESSAGE(puah->DefWndProcArray, WM_NCPAINT);
|
UAH_HOOK_MESSAGE(puah->DefWndProcArray, WM_NCPAINT);
|
||||||
UAH_HOOK_MESSAGE(puah->DefWndProcArray, WM_NCACTIVATE);
|
UAH_HOOK_MESSAGE(puah->DefWndProcArray, WM_NCACTIVATE);
|
||||||
|
|
|
@ -1221,6 +1221,7 @@ extern "C" {
|
||||||
#define SIF_RANGE 1
|
#define SIF_RANGE 1
|
||||||
#define SIF_DISABLENOSCROLL 8
|
#define SIF_DISABLENOSCROLL 8
|
||||||
#define SIF_TRACKPOS 16
|
#define SIF_TRACKPOS 16
|
||||||
|
#define SIF_THEMED 128
|
||||||
#define SWP_DRAWFRAME 32
|
#define SWP_DRAWFRAME 32
|
||||||
#define SWP_FRAMECHANGED 32
|
#define SWP_FRAMECHANGED 32
|
||||||
#define SWP_HIDEWINDOW 128
|
#define SWP_HIDEWINDOW 128
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1723,7 +1723,7 @@ SetScrollPos(HWND hWnd, INT nBar, INT nPos, BOOL bRedraw)
|
||||||
ScrollInfo.fMask = SIF_POS|SIF_PREVIOUSPOS;
|
ScrollInfo.fMask = SIF_POS|SIF_PREVIOUSPOS;
|
||||||
ScrollInfo.nPos = nPos;
|
ScrollInfo.nPos = nPos;
|
||||||
|
|
||||||
return RealSetScrollInfo(hWnd, nBar, &ScrollInfo, bRedraw);
|
return SetScrollInfo(hWnd, nBar, &ScrollInfo, bRedraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue