Since 2353ef9bd5c gdi32 links to user32, no reason to keep this workaround in Uniscribe part.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com ---
Another alternative is to use NtUser variant.
dlls/gdi32/uniscribe/usp10.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/dlls/gdi32/uniscribe/usp10.c b/dlls/gdi32/uniscribe/usp10.c index a5637dbf645..ab7923f0690 100644 --- a/dlls/gdi32/uniscribe/usp10.c +++ b/dlls/gdi32/uniscribe/usp10.c @@ -2107,19 +2107,6 @@ static inline BOOL does_glyph_start_cluster(const SCRIPT_VISATTR *pva, const WOR return FALSE; }
-static DWORD get_sys_color(INT index) -{ - static DWORD (WINAPI *pGetSysColor)(INT index); - - if (!pGetSysColor) - { - HMODULE user = GetModuleHandleW( L"user32.dll" ); - if (user) pGetSysColor = (void *)GetProcAddress( user, "GetSysColor" ); - } - - return pGetSysColor(index); -} - static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa, int iX, int iY, @@ -2159,11 +2146,11 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa, BkMode = GetBkMode(analysis->hdc); SetBkMode( analysis->hdc, OPAQUE); BkColor = GetBkColor(analysis->hdc); - SetBkColor(analysis->hdc, get_sys_color(COLOR_HIGHLIGHT)); + SetBkColor(analysis->hdc, GetSysColor(COLOR_HIGHLIGHT)); if (!fDisabled) { TextColor = GetTextColor(analysis->hdc); - SetTextColor(analysis->hdc, get_sys_color(COLOR_HIGHLIGHTTEXT)); + SetTextColor(analysis->hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); } } if (analysis->glyphs[iItem].fallbackFont)
On Tue, Apr 19, 2022 at 01:52:16PM +0100, Huw Davies wrote:
Signed-off-by: Huw Davies huw@codeweavers.com
Actually let's use NtUserGetSysColor(). I've sent in a version that does that.
Huw.