From 12565eabc7050e9c889fb4510fb655983345c719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 29 May 2026 14:23:15 -0400 Subject: [PATCH] =?UTF-8?q?fix(gpui):=20restore=20Windows/Linux=20build=20?= =?UTF-8?q?=E2=80=94=20sync=5Fnative=5Fsurface=20signature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 3678db6 added a `corner_radii: Corners` 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`, 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) --- third_party/gpui/src/platform/linux/wayland/window.rs | 7 ++++++- third_party/gpui/src/platform/linux/x11/window.rs | 7 ++++++- third_party/gpui/src/platform/windows/window.rs | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/third_party/gpui/src/platform/linux/wayland/window.rs b/third_party/gpui/src/platform/linux/wayland/window.rs index 0ed2112..2e48fe5 100644 --- a/third_party/gpui/src/platform/linux/wayland/window.rs +++ b/third_party/gpui/src/platform/linux/wayland/window.rs @@ -1084,7 +1084,12 @@ impl PlatformWindow for WaylandWindow { )) } - fn sync_native_surface(&self, surface: &crate::NativeSurfaceHandle, bounds: Bounds) { + fn sync_native_surface( + &self, + surface: &crate::NativeSurfaceHandle, + bounds: Bounds, + _corner_radii: crate::Corners, + ) { let state = self.borrow(); let bounds = bounds.to_device_pixels(state.scale); if let Some(native_surface) = state.native_surfaces.get(&surface.identity()) { diff --git a/third_party/gpui/src/platform/linux/x11/window.rs b/third_party/gpui/src/platform/linux/x11/window.rs index 0cc1e61..01f1c84 100644 --- a/third_party/gpui/src/platform/linux/x11/window.rs +++ b/third_party/gpui/src/platform/linux/x11/window.rs @@ -1521,7 +1521,12 @@ impl PlatformWindow for X11Window { )) } - fn sync_native_surface(&self, surface: &NativeSurfaceHandle, bounds: Bounds) { + fn sync_native_surface( + &self, + surface: &NativeSurfaceHandle, + bounds: Bounds, + _corner_radii: crate::Corners, + ) { let state = self.0.state.borrow(); let bounds = bounds.to_device_pixels(state.scale_factor); drop(state); diff --git a/third_party/gpui/src/platform/windows/window.rs b/third_party/gpui/src/platform/windows/window.rs index c1d339a..92d2007 100644 --- a/third_party/gpui/src/platform/windows/window.rs +++ b/third_party/gpui/src/platform/windows/window.rs @@ -871,7 +871,12 @@ impl PlatformWindow for WindowsWindow { Some(NativeSurfaceHandle::from_win32_hwnd(hwnd.0 as isize)) } - fn sync_native_surface(&self, surface: &NativeSurfaceHandle, bounds: Bounds) { + fn sync_native_surface( + &self, + surface: &NativeSurfaceHandle, + bounds: Bounds, + _corner_radii: crate::Corners, + ) { let bounds = bounds.to_device_pixels(self.scale_factor()); let hwnd = HWND(surface.win32_hwnd() as _); unsafe {