From eb1876f305fb0694df0a1a91d9eae05b2edc7739 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 14 Jun 2007 09:41:08 +0000 Subject: [PATCH] Use g_win32_get_windows_version() instead of _winver so that this compiles 2007-06-14 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use g_win32_get_windows_version() instead of _winver so that this compiles on Cygwin, too. Not that I know if it makes sense to build GTK+ with the Win32 backend for Cygwin, but some people want to. svn path=/trunk/; revision=18132 --- ChangeLog | 8 ++++++++ gdk/win32/gdkwindow-win32.c | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7ab28f78e..2f536ebe10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-14 Tor Lillqvist + + * gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use + g_win32_get_windows_version() instead of _winver so that this + compiles on Cygwin, too. Not that I know if it makes sense to + build GTK+ with the Win32 backend for Cygwin, but some people want + to. + 2007-06-13 Matthias Clasen * NEWS: Updates diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index fad5644a3b..ae0b7314d8 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -422,8 +422,12 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint) { wcl.lpszClassName = "gdkWindowTempShadow"; wcl.style |= CS_SAVEBITS; - if (_winver >= 0x0501) /* Windows XP (5.1) or above */ - 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 = RegisterClassEx (&wcl); }