Draw checkerboard (or clear color) under embedded window.

This commit is contained in:
Pāvels Nadtočajevs
2025-05-13 09:08:10 +03:00
parent c0ebba60de
commit 6a118b5027
4 changed files with 36 additions and 1 deletions

View File

@ -192,7 +192,7 @@ DisplayServerEmbedded::DisplayServerEmbedded(const String &p_rendering_driver, W
layer.contentsScale = scale;
layer.magnificationFilter = kCAFilterNearest;
layer.minificationFilter = kCAFilterNearest;
layer.opaque = YES; // Always opaque when embedded.
layer.opaque = NO; // Never opaque when embedded, clear color is drawn by control under the view.
layer.actions = @{ @"contents" : [NSNull null] }; // Disable implicit animations for contents.
// AppKit frames, bounds and positions are always in points.
CGRect bounds = CGRectMake(0, 0, p_resolution.width, p_resolution.height);