]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.backend.cocoa.views: make compatible with 10.6.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 26 Nov 2012 22:48:42 +0000 (14:48 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 26 Nov 2012 22:48:42 +0000 (14:48 -0800)
basis/ui/backend/cocoa/views/views.factor

index 82b44d22acd581e91c76984d9ad4cc0819e3dd02..9c89dd209b4ef2a703300000296acd2c881651b6 100644 (file)
@@ -5,9 +5,9 @@ arrays assocs cocoa cocoa.application cocoa.classes
 cocoa.pasteboard cocoa.runtime cocoa.subclassing cocoa.types
 cocoa.views combinators core-foundation.strings core-graphics
 core-graphics.types core-text io.encodings.utf8 kernel locals
-math math.rectangles namespaces opengl sequences threads
-ui.gadgets ui.gadgets.private ui.gadgets.worlds ui.gestures
-ui.private ;
+math math.order math.rectangles namespaces opengl sequences
+system-info threads ui.gadgets ui.gadgets.private
+ui.gadgets.worlds ui.gestures ui.private ;
 IN: ui.backend.cocoa.views
 
 : send-mouse-moved ( view event -- )
@@ -306,10 +306,12 @@ CLASS: FactorView < NSOpenGLView NSTextInput
     METHOD: NSInteger conversationIdentifier [ self alien-address ]
 
     METHOD: void prepareOpenGL [
-        self 1 -> setWantsBestResolutionOpenGLSurface:
-        self -> backingScaleFactor dup 1.0 > [
-            gl-scale-factor set-global t retina? set-global
-        ] [ drop ] if
+        os-version { 10 7 0 } after=? [
+            self 1 -> setWantsBestResolutionOpenGLSurface:
+            self -> backingScaleFactor dup 1.0 > [
+                gl-scale-factor set-global t retina? set-global
+            ] [ drop ] if
+        ] when
     ]
 
     ! Initialization