[gtk/wip/jimmac/icon-dropshadows: 4/13] Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/jimmac/icon-dropshadows: 4/13] Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.
- Date: Wed, 14 Nov 2018 11:37:12 +0000 (UTC)
commit 846889dbeb424cd74f08d34afcf1ecc112ddda36
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 4ffbae047d..c7fe68848a 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -137,8 +137,10 @@ gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
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]