https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bc90cbbb88f1b845a230c…
commit bc90cbbb88f1b845a230cf5e5b331a8b5f8f0871
Author: Dmitry Borisov <di.sean(a)protonmail.com>
AuthorDate: Sat Oct 31 01:06:30 2020 +0600
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sun Dec 20 23:12:30 2020 +0300
[WIN32K:NTUSER] Fix gradient caption bars with low color depth (#3338)
This fixes a problem when the window title bar is dithered down
to the 16- or 256-color palette. See also commit 0705f30.
---
win32ss/user/ntuser/sysparams.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/sysparams.c b/win32ss/user/ntuser/sysparams.c
index 3907b17aff7..32b62cc026f 100644
--- a/win32ss/user/ntuser/sysparams.c
+++ b/win32ss/user/ntuser/sysparams.c
@@ -1583,7 +1583,17 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
return SpiSetUserPref(UPM_LISTBOXSMOOTHSCROLLING, pvParam, fl);
case SPI_GETGRADIENTCAPTIONS:
- return SpiGetUserPref(UPM_GRADIENTCAPTIONS, pvParam, fl);
+ {
+ if (NtGdiGetDeviceCaps(ScreenDeviceContext, BITSPIXEL) <= 8)
+ {
+ INT iValue = 0;
+ return SpiGetInt(pvParam, &iValue, fl);
+ }
+ else
+ {
+ return SpiGetUserPref(UPM_GRADIENTCAPTIONS, pvParam, fl);
+ }
+ }
case SPI_SETGRADIENTCAPTIONS:
return SpiSetUserPref(UPM_GRADIENTCAPTIONS, pvParam, fl);