Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

worspace: Add partial window bound fix when switching between CSD and SSD on Wayland (#31335)

marius851000968587a7456b
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs
index 91d0a201787..141cd36efd9 100644
--- a/crates/workspace/src/workspace.rs
+++ b/crates/workspace/src/workspace.rs
@@ -7561,6 +7561,7 @@ fn parse_pixel_size_env_var(value: &str) -> Option<Size<Pixels>> {
Some(size(px(width as f32), px(height as f32)))
}
+/// Add client-side decorations (rounded corners, shadows, resize handling) when appropriate.
pub fn client_side_decorations(
element: impl IntoElement,
window: &mut Window,
@@ -7569,8 +7570,9 @@ pub fn client_side_decorations(
const BORDER_SIZE: Pixels = px(1.0);
let decorations = window.window_decorations();
- if matches!(decorations, Decorations::Client { .. }) {
- window.set_client_inset(theme::CLIENT_SIDE_DECORATION_SHADOW);
+ match decorations {
+ Decorations::Client { .. } => window.set_client_inset(theme::CLIENT_SIDE_DECORATION_SHADOW),
+ Decorations::Server { .. } => window.set_client_inset(px(0.0)),
}
struct GlobalResizeEdge(ResizeEdge);