fix(gpui): restore Windows/Linux build — sync_native_surface signature
Commit 3678db6 added a `corner_radii: Corners<Pixels>` parameter to the
`PlatformWindow::sync_native_surface` trait method (and to the macOS impl
and the `native_surface` element call site) to clip the overlay to the
panel's rounded corners, but left the Windows, X11, and Wayland impls at
the old 2-argument signature. A 2-arg method in an `impl PlatformWindow`
block against a 3-arg trait method is an E0050 compile error, so the
workspace no longer built on Windows, X11, or Wayland — only macOS, which
is the sole CI runner, so it went unnoticed. This breaks the project's
explicit macOS/Windows/Linux requirement.
Align all three impls to the trait by accepting `_corner_radii`. Bodies
are unchanged: those platforms position/size the child surface exactly as
before and do not clip its corners (the pre-3678db6 behaviour on every
platform — not a regression; per-platform corner clipping can land later).
Verified: signatures now match the trait (`crate::Corners<Pixels>`, the
same path the trait uses), rustfmt parses all three files, and the macOS
build is unaffected (cargo check -p ely_app clean). Windows/Linux cannot
be compile-checked on this macOS host (their C deps need the platform SDK),
but the fix is a type-level signature alignment to a known trait.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -1521,7 +1521,12 @@ impl PlatformWindow for X11Window {
|
||||
))
|
||||
}
|
||||
|
||||
fn sync_native_surface(&self, surface: &NativeSurfaceHandle, bounds: Bounds<Pixels>) {
|
||||
fn sync_native_surface(
|
||||
&self,
|
||||
surface: &NativeSurfaceHandle,
|
||||
bounds: Bounds<Pixels>,
|
||||
_corner_radii: crate::Corners<Pixels>,
|
||||
) {
|
||||
let state = self.0.state.borrow();
|
||||
let bounds = bounds.to_device_pixels(state.scale_factor);
|
||||
drop(state);
|
||||
|
||||
Reference in New Issue
Block a user