aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winclipboardunicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winclipboardunicode.c')
-rw-r--r--xorg-server/hw/xwin/winclipboardunicode.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/xorg-server/hw/xwin/winclipboardunicode.c b/xorg-server/hw/xwin/winclipboardunicode.c
index ba86915a4..947475509 100644
--- a/xorg-server/hw/xwin/winclipboardunicode.c
+++ b/xorg-server/hw/xwin/winclipboardunicode.c
@@ -43,25 +43,43 @@ Bool
winClipboardDetectUnicodeSupport (void)
{
Bool fReturn = FALSE;
- OSVERSIONINFO osvi = {0};
+ OSVERSIONINFOEX osvi = {0};
/* Get operating system version information */
osvi.dwOSVersionInfoSize = sizeof (osvi);
- GetVersionEx (&osvi);
+ GetVersionEx ((LPOSVERSIONINFO)&osvi);
/* Branch on platform ID */
switch (osvi.dwPlatformId)
{
case VER_PLATFORM_WIN32_NT:
- /* Unicode supported on NT only */
- ErrorF ("DetectUnicodeSupport - Windows NT/2000/XP\n");
- fReturn = TRUE;
+ if (osvi.dwMajorVersion >= 6)
+ {
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ winDebug ("OS: Windows Vista\n");
+ else
+ winDebug ("OS: Windows Server 2008\n");
+ fReturn = TRUE;
+ }
+ else if (osvi.dwMajorVersion == 5)
+ {
+ if (osvi.dwMinorVersion == 2)
+ {
+ winDebug ("OS: Windows 2003\n");
+ fReturn = TRUE;
+ }
+ else if (osvi.dwMinorVersion == 1)
+ {
+ winDebug ("OS: Windows XP\n");
+ fReturn = TRUE;
+ }
+ else if (osvi.dwMinorVersion == 0) winDebug ("OS: Windows 2000\n");
+ }
+ else if (osvi.dwMajorVersion <= 4) winDebug ("OS: Windows NT\n");
break;
case VER_PLATFORM_WIN32_WINDOWS:
- /* Unicode is not supported on non-NT */
- ErrorF ("DetectUnicodeSupport - Windows 95/98/Me\n");
- fReturn = FALSE;
+ winDebug ("OS: Windows 95/98/Me\n");
break;
}