[gtk/gtk-3-24] [quartz] Fix build on macOS versions before 10.14.



commit 56d9dc95d9544082ffa81efb5941942fc8f4aa18
Author: John Ralls <jralls ceridwen us>
Date:   Mon Jun 20 17:15:49 2022 -0700

    [quartz] Fix build on macOS versions before 10.14.
    
    shouldInheritContentScale was introduced in 10.14.

 gdk/quartz/GdkQuartzView.c | 2 ++
 gdk/quartz/GdkQuartzView.h | 4 ++++
 2 files changed, 6 insertions(+)
---
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index 543d1d8364..01d482267e 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -526,6 +526,7 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
 
 }
 
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
 -(BOOL)layer:(CALayer*) layer shouldInheritContentsScale: (CGFloat)scale fromWindow: (NSWindow *) window
 {
   if (layer == self.layer && window == self.window)
@@ -535,6 +536,7 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
     }
   return YES;
 }
+#endif
 
 -(void)setFrame: (NSRect)frame
 {
diff --git a/gdk/quartz/GdkQuartzView.h b/gdk/quartz/GdkQuartzView.h
index e1530bdd71..8c33772608 100644
--- a/gdk/quartz/GdkQuartzView.h
+++ b/gdk/quartz/GdkQuartzView.h
@@ -34,7 +34,11 @@
 #define GIC_FILTER_PASSTHRU    0
 #define GIC_FILTER_FILTERED    1
 
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
+@interface GdkQuartzView : NSView <NSTextInputClient>
+#else
 @interface GdkQuartzView : NSView <NSTextInputClient, NSViewLayerContentScaleDelegate>
+#endif
 {
   GdkWindow *gdk_window;
   NSTrackingRectTag trackingRect;


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