[gtk+] gdk-win32: Clean Up A Bit



commit bbac0eb3b938769d450310022ab7d5e8109525e4
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Apr 15 17:17:06 2015 +0800

    gdk-win32: Clean Up A Bit
    
    As GLib dropped Windows 2000 support some time ago [1][2], and the current
    git master already depends on a GLib release that is well after it dropped
    Windows 2000 support, clean up the code a bit as we are assured that the
    code will run on XP and later, plus, we have dropped XP support during
    this cycle with commit b85f0cc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741849
    
    [1]: https://git.gnome.org/browse/glib/commit/?id=80c24d36f2525d83e458ebbdf62fdbd085945a02
    [2]: https://git.gnome.org/browse/glib/commit/?id=731b46990896665a8107535080bb075a6e18b6f7

 gdk/win32/gdkcursor-win32.c |   17 +----------------
 gdk/win32/gdkwindow-win32.c |    8 ++------
 2 files changed, 3 insertions(+), 22 deletions(-)
---
diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c
index 28b2745..eb4a454 100644
--- a/gdk/win32/gdkcursor-win32.c
+++ b/gdk/win32/gdkcursor-win32.c
@@ -821,22 +821,7 @@ _gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf,
 gboolean
 _gdk_win32_pixbuf_to_hicon_supports_alpha (void)
 {
-  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;
+  return TRUE;
 }
 
 HICON
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 3e568a4..da85ded 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -375,12 +375,8 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
             {
               wcl.lpszClassName = L"gdkWindowTempShadow";
               wcl.style |= CS_SAVEBITS;
-              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 */
-               }
+              wcl.style |= 0x00020000; /* CS_DROPSHADOW */
+
               ONCE_PER_CLASS ();
               klassTEMPSHADOW = RegisterClassExW (&wcl);
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]