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.

gpui/mac: Disable shadows on non-opaque windows (#10896)

jansol35c3af7fd0f6
diff --git a/crates/gpui/src/platform/mac/window.rs b/crates/gpui/src/platform/mac/window.rs
index 22ee22b50ba..340ef6a45b5 100644
--- a/crates/gpui/src/platform/mac/window.rs
+++ b/crates/gpui/src/platform/mac/window.rs
@@ -996,6 +996,8 @@ impl PlatformWindow for MacWindow {
};
unsafe {
this.native_window.setOpaque_(opaque);
+ // Shadows for transparent windows cause artifacts and performance issues
+ this.native_window.setHasShadow_(opaque);
let clear_color = if opaque == YES {
NSColor::colorWithSRGBRed_green_blue_alpha_(nil, 0f64, 0f64, 0f64, 1f64)
} else {