diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index eb4a454228..28b2745266 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -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 diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index da85ded5e2..3e568a4a99 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -375,8 +375,12 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint) { wcl.lpszClassName = L"gdkWindowTempShadow"; wcl.style |= CS_SAVEBITS; - wcl.style |= 0x00020000; /* CS_DROPSHADOW */ - + if (LOBYTE (g_win32_get_windows_version()) > 0x05 || + LOWORD (g_win32_get_windows_version()) == 0x0105) + { + /* Windows XP (5.1) or above */ + wcl.style |= 0x00020000; /* CS_DROPSHADOW */ + } ONCE_PER_CLASS (); klassTEMPSHADOW = RegisterClassExW (&wcl); }