Use g_win32_get_windows_version() instead of _winver so that this compiles

2007-06-14  Tor Lillqvist  <tml@novell.com>

	* 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
This commit is contained in:
Tor Lillqvist 2007-06-14 09:41:08 +00:00 committed by Tor Lillqvist
parent 074fac90bb
commit eb1876f305
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2007-06-14 Tor Lillqvist <tml@novell.com>
* 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 <mclasen@redhat.com>
* NEWS: Updates

View File

@ -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);
}