[gtk/gtk-3-24: 1/2] macOS: Fix QuartzCore linking and compiling with 10.11




commit 0ac61443694b477c41fc246cb387ef86aba441de
Author: Thomas Holder <thomas thomas-holder de>
Date:   Wed Dec 29 11:31:37 2021 +0100

    macOS: Fix QuartzCore linking and compiling with 10.11
    
    Follow-up on 10b5f8a0d6ab
    
    Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4573

 gdk/quartz/GdkQuartzView.c | 2 ++
 gdk/quartz/meson.build     | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index d3eca93207..c20c5de83a 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -298,8 +298,10 @@
    */
   if(gdk_quartz_osx_version() >= GDK_OSX_BIGSUR)
   {
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     CALayer* layer = self.layer;
     layer.contentsFormat = kCAContentsFormatRGBA8Uint;
+#endif
   }
 
   [super viewWillDraw];
diff --git a/gdk/quartz/meson.build b/gdk/quartz/meson.build
index 70d688e1a7..619c0242e0 100644
--- a/gdk/quartz/meson.build
+++ b/gdk/quartz/meson.build
@@ -48,8 +48,9 @@ core_graphics_dep = dependency('appleframeworks', modules : 'CoreGraphics', requ
 appkit_dep = dependency('appleframeworks', modules : 'AppKit', required : true)
 cocoa_dep = dependency('appleframeworks', modules : 'Cocoa', required : true)
 carbon_dep = dependency('appleframeworks', modules : 'Carbon', required : true)
+quartzcore_dep = dependency('appleframeworks', modules : 'QuartzCore', required : true)
 
-gdk_quartz_deps = [ core_graphics_dep, appkit_dep, cocoa_dep, carbon_dep ]
+gdk_quartz_deps = [ core_graphics_dep, appkit_dep, cocoa_dep, carbon_dep, quartzcore_dep ]
 
 libgdk_quartz = static_library('gdk-quartz',
   gdk_quartz_sources, gdkconfig, gdkenum_h,


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