[quartz] Fix build on macOS versions before 10.14.

shouldInheritContentScale was introduced in 10.14.
This commit is contained in:
John Ralls 2022-06-20 17:15:49 -07:00
parent a108de6f61
commit 56d9dc95d9
2 changed files with 6 additions and 0 deletions

View File

@ -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
{

View File

@ -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;