From 955a660368df5cfa2a6e0c429b9275e2ab742eee Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 22 Dec 2008 02:52:47 +0000 Subject: [PATCH] - Start populating server information structure. This fixes the icon issues with other languages. svn path=/trunk/; revision=38258 --- reactos/dll/win32/user32/windows/icon.c | 4 ++-- reactos/include/reactos/win32k/ntuser.h | 13 +++++++++++++ reactos/subsystems/win32/win32k/ntuser/winsta.c | 5 +++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/user32/windows/icon.c b/reactos/dll/win32/user32/windows/icon.c index 78e1da8de0d..d7f940a6883 100644 --- a/reactos/dll/win32/user32/windows/icon.c +++ b/reactos/dll/win32/user32/windows/icon.c @@ -670,13 +670,13 @@ LookupIconIdFromDirectoryEx(PBYTE xdir, { ColorBits = 1; } - else if (g_psi->SystemMetrics[SM_SAMEDISPLAYFORMAT] || (cFlag & LR_VGACOLOR) ) + else if (cFlag & LR_VGACOLOR) { ColorBits = 4; } else { - ColorBits = 0; + ColorBits = g_psi->BitsPixel; } if(bIcon) diff --git a/reactos/include/reactos/win32k/ntuser.h b/reactos/include/reactos/win32k/ntuser.h index 67ee5b996fd..f9bee7a5a61 100644 --- a/reactos/include/reactos/win32k/ntuser.h +++ b/reactos/include/reactos/win32k/ntuser.h @@ -277,6 +277,19 @@ typedef struct _SERVERINFO COLORREF SysColors[COLOR_MENUBAR+1]; // GetSysColor HBRUSH SysColorBrushes[COLOR_MENUBAR+1]; // GetSysColorBrush HPEN SysColorPens[COLOR_MENUBAR+1]; // ReactOS exclusive + // + RECTL rcScreen; + WORD BitCount; + WORD dmLogPixels; + BYTE BitsPixel; + BYTE Planes; + WORD reserved; + DWORD PUSIFlags; + ULONG uCaretWidth; + LANGID UILangID; + UINT LastRITWasKeyboard : 1; + UINT bKeyboardPref : 1; + DWORD TimeTick; DWORD SrvEventActivity; } SERVERINFO, *PSERVERINFO; diff --git a/reactos/subsystems/win32/win32k/ntuser/winsta.c b/reactos/subsystems/win32/win32k/ntuser/winsta.c index 4bb1b28d888..8925dd2474d 100644 --- a/reactos/subsystems/win32/win32k/ntuser/winsta.c +++ b/reactos/subsystems/win32/win32k/ntuser/winsta.c @@ -315,6 +315,11 @@ co_IntInitializeDesktopGraphics(VOID) NtGdiSelectFont( hSystemBM, NtGdiGetStockObject(SYSTEM_FONT)); IntGdiSetDCOwnerEx( hSystemBM, GDI_OBJ_HMGR_PUBLIC, FALSE); + // FIXME! Move these to a update routine. + gpsi->Planes = NtGdiGetDeviceCaps(ScreenDeviceContext, PLANES); + gpsi->BitsPixel = NtGdiGetDeviceCaps(ScreenDeviceContext, BITSPIXEL); + gpsi->BitCount = gpsi->Planes * gpsi->BitsPixel; + return TRUE; }