Revert "gdk-win32: Clean Up A Bit"

This reverts commit 24d3f3fcb2.

Sorry, I am going to re-commit this very shortly with a new
commit message, as I found the commit message to be quite
wrong and misleading.
This commit is contained in:
Chun-wei Fan
2015-04-17 11:29:07 +08:00
parent b85f0ccc67
commit c6a8ead931
2 changed files with 22 additions and 3 deletions

View File

@ -821,7 +821,22 @@ _gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf,
gboolean
_gdk_win32_pixbuf_to_hicon_supports_alpha (void)
{
return TRUE;
static gboolean is_win_xp=FALSE, is_win_xp_checked=FALSE;
if (!is_win_xp_checked)
{
OSVERSIONINFO version;
is_win_xp_checked = TRUE;
memset (&version, 0, sizeof (version));
version.dwOSVersionInfoSize = sizeof (version);
is_win_xp = GetVersionEx (&version)
&& version.dwPlatformId == VER_PLATFORM_WIN32_NT
&& (version.dwMajorVersion > 5
|| (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1));
}
return is_win_xp;
}
HICON