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.

Ignore invisible layers for mouse events

Conrad Irwin17a80ca09b8c
diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rs
index 1954e3086c6..6b1dd3e5458 100644
--- a/crates/gpui2/src/elements/div.rs
+++ b/crates/gpui2/src/elements/div.rs
@@ -890,10 +890,11 @@ impl Interactivity {
});
}
- if style
- .background
- .as_ref()
- .is_some_and(|fill| fill.color().is_some())
+ if style.visibility == Visibility::Visible
+ && style
+ .background
+ .as_ref()
+ .is_some_and(|fill| fill.color().is_some())
{
cx.with_z_index(style.z_index.unwrap_or(0), |cx| cx.add_opaque_layer(bounds))
}