[gtk/wip/chergert/macos-iosurface] use private API that isn't really private



commit 07586daa68157a979336248d0ac1f7081912aea9
Author: Christian Hergert <christian hergert me>
Date:   Fri Feb 11 16:25:14 2022 -0800

    use private API that isn't really private
    
    avoid using "black" to specify what we really want, the damn region is
    opaque.

 gdk/macos/GdkMacosLayer.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gdk/macos/GdkMacosLayer.c b/gdk/macos/GdkMacosLayer.c
index d09761a468..45b206f1cb 100644
--- a/gdk/macos/GdkMacosLayer.c
+++ b/gdk/macos/GdkMacosLayer.c
@@ -23,6 +23,10 @@
 #import "GdkMacosLayer.h"
 #import "GdkMacosTile.h"
 
+@protocol CanSetContentsOpaque
+- (void)setContentsOpaque:(BOOL)mask;
+@end
+
 @implementation GdkMacosLayer
 
 #define TILE_MAX_SIZE 128
@@ -218,6 +222,7 @@ fromCGRect (const CGRect rect)
       [info->tile setAffineTransform:transform];
       [info->tile setContentsScale:1.0f];
       [info->tile setOpaque:info->opaque];
+      [(id<CanSetContentsOpaque>)info->tile setContentsOpaque:info->opaque];
       [info->tile setFrame:info->area];
 
       [self addSublayer:info->tile];


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