From a7b56ed43aefccfdc0cc99aa55f1d188572670de Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 6 Nov 2005 05:01:43 +0000 Subject: [PATCH] Check G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by 2005-11-06 Tor Lillqvist * gdk/win32/gdkcursor-win32.c (_gdk_win32_pixbuf_to_hicon_supports_alpha): Check G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by setting the G_WIN32_PRETEND_WIN9X environment variable. --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ gdk/win32/gdkcursor-win32.c | 22 ++++++++++++++-------- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index fda4ab4337..415d3e51f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ the Win32 backend, check that GdkDisplay* parameters are equal to _gdk_display instead of using the unnecessarily general GDK_IS_DISPLAY(). + (_gdk_win32_pixbuf_to_hicon_supports_alpha): Check + G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x + by setting the G_WIN32_PRETEND_WIN9X environment variable. Make icon masks work on Win98 (#320152, Peter Zelezny) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fda4ab4337..415d3e51f7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -4,6 +4,9 @@ the Win32 backend, check that GdkDisplay* parameters are equal to _gdk_display instead of using the unnecessarily general GDK_IS_DISPLAY(). + (_gdk_win32_pixbuf_to_hicon_supports_alpha): Check + G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x + by setting the G_WIN32_PRETEND_WIN9X environment variable. Make icon masks work on Win98 (#320152, Peter Zelezny) diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index 40858958d4..dbc9e886a6 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -834,15 +834,21 @@ _gdk_win32_pixbuf_to_hicon_supports_alpha (void) 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)); + + if (!G_WIN32_IS_NT_BASED ()) + is_win_xp = FALSE; + else + { + OSVERSIONINFO version; + + 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; }