Initial start

This commit is contained in:
2026-01-16 03:40:47 +00:00
parent 4a64927c12
commit aab53ee919
5 changed files with 161 additions and 18 deletions

View File

@@ -27,22 +27,9 @@ public class GtkWebViewProxy : SkiaView
public override void Arrange(SKRect bounds)
{
base.Arrange(bounds);
var windowBounds = TransformToWindow(bounds);
_handler.RegisterWithHost(windowBounds);
}
private SKRect TransformToWindow(SKRect localBounds)
{
float x = localBounds.Left;
float y = localBounds.Top;
for (var parent = Parent; parent != null; parent = parent.Parent)
{
x += parent.Bounds.Left;
y += parent.Bounds.Top;
}
return new SKRect(x, y, x + localBounds.Width, y + localBounds.Height);
// Bounds are already in absolute window coordinates - use them directly
// The Skia layout system uses absolute coordinates throughout
_handler.RegisterWithHost(Bounds);
}
public override void Draw(SKCanvas canvas)