[gtk/gtk-2-24] Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.



commit ac3ec980297b81c144c176c16c5fc97424979be5
Author: John Ralls <jralls ceridwen us>
Date:   Mon Oct 15 10:45:57 2018 -0700

    Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.

 gdk/quartz/gdkwindow-quartz.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index bab9afbcf9..d745da54de 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -109,8 +109,10 @@ gdk_window_impl_quartz_get_context (GdkDrawable *drawable,
       if (![window_impl->view lockFocusIfCanDraw])
         return NULL;
     }
-
-  cg_context = [[NSGraphicsContext currentContext] graphicsPort];
+  if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE)
+       cg_context = [[NSGraphicsContext currentContext] graphicsPort];
+  else
+       cg_context = [[NSGraphicsContext currentContext] CGContext];
   CGContextSaveGState (cg_context);
   CGContextSetAllowsAntialiasing (cg_context, antialias);
 


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