Author: manolo
Date: 2011-09-16 01:41:27 -0700 (Fri, 16 Sep 2011)
New Revision: 9040
Log:
Use the fl_mac_os_version global variable to check for OS Lion instead of 
recomputing it.

Modified:
   branches/branch-3.0/src/fltk3/Window.cxx

Modified: branches/branch-3.0/src/fltk3/Window.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Window.cxx    2011-09-16 08:29:23 UTC (rev 
9039)
+++ branches/branch-3.0/src/fltk3/Window.cxx    2011-09-16 08:41:27 UTC (rev 
9040)
@@ -118,18 +118,7 @@
   // on OS X, windows have no frame. To resize a window, we drag the lower 
right
   // corner. This code draws a little ribbed triangle for dragging.
   // Starting with 10.7, OS X windows have a hidden frame and the corner is no 
longer needed
-  static signed char showCorner = -1;
-  if (showCorner==-1) {
-    SInt32 majorVersion, minorVersion;
-    Gestalt(gestaltSystemVersionMajor, &majorVersion);
-    Gestalt(gestaltSystemVersionMinor, &minorVersion);
-    showCorner = 1;
-    if (majorVersion>10 || (majorVersion==10 && minorVersion>=7)) {
-      showCorner = 0;
-    }
-  }
-  if (showCorner==1) {
-    extern CGContextRef fl_gc;
+  if (fl_mac_os_version < 100700) {
     if (fl_gc && !parent() && resizable() && (!size_range_set || minh!=maxh || 
minw!=maxw)) {
       int dx = fltk3::box_dw(box())-fltk3::box_dx(box());
       int dy = fltk3::box_dh(box())-fltk3::box_dy(box());

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to