diff options
Diffstat (limited to 'xorg-server/hw/xwin/winclipboardunicode.c')
-rw-r--r-- | xorg-server/hw/xwin/winclipboardunicode.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/xorg-server/hw/xwin/winclipboardunicode.c b/xorg-server/hw/xwin/winclipboardunicode.c index 9c06f7b4d..530ad9a01 100644 --- a/xorg-server/hw/xwin/winclipboardunicode.c +++ b/xorg-server/hw/xwin/winclipboardunicode.c @@ -42,22 +42,42 @@ 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 */ + 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 */ - fReturn = FALSE; + winDebug ("OS: Windows 95/98/Me\n"); break; } |