#3056
Inspector cannot inspect any element inside the application window
Description
window-backdrop shadows anything drawn in the window.
Environment
- GPUI: the one used in gpui-kit
- GPUI Component:
main - Platform: Alpine Linux 3.24, KDE Plasma 6.6.6, KDE Frameworks 6.26.0, Qt 6.11.1 (Wayland)
Steps to Reproduce
- Run
gpui-component-story - Open Inspector
- Point at anything in the window (except borders/outside of window)
- Inspector sees only
window-backdrop
Screenshots
Hovering over Button in sidebar
Hovering over window border
Hovering over elements in inspector
Activity
4Below fixes the backdrop but then NotificationList (https://github.com/longbridge/gpui-component/blob/c33bfebf03f5f7a1751d0395b40c786b869a9f50/crates/component/src/notification.rs#L1036) steals all the focus anyway and I'm unsure how to fix that.
diff --git a/crates/component/src/window_border.rs b/crates/component/src/window_border.rs
index 9611d0eec0cf..8b873427a1c5 100644
--- a/crates/component/src/window_border.rs
+++ b/crates/component/src/window_border.rs
@@ -270,14 +270,14 @@ impl RenderOnce for WindowBorder {
.when(matches!(decorations, Decorations::Client { .. }), |this| {
let Decorations::Client { tiling, .. } = decorations else {
return this;
};
- this.child(div().absolute().size_full().children(resize_hit_zones(
+ this.children(resize_hit_zones(
window_size,
platform_inset,
resize_hit_size,
&tiling,
- )))
+ ))
})
}
}This fixes inspector but obviously breaks notifications...
diff --git a/crates/component/src/notification.rs b/crates/component/src/notification.rs
index 9a71c307d807..b98304c12282 100644
--- a/crates/component/src/notification.rs
+++ b/crates/component/src/notification.rs
@@ -1032,9 +1032,9 @@ impl Render for NotificationList {
Anchor::RightCenter => this.right(margins.right).top_0().bottom_0().my_auto(),
})
});
- div().size_full().children(stacks)
+ div().children(stacks)
}
}
#[cfg(test)]
diff --git a/crates/component/src/root.rs b/crates/component/src/root.rs
index a6c9021cf1ed..de7a9f4a7e2b 100644
--- a/crates/component/src/root.rs
+++ b/crates/component/src/root.rs
@@ -197,9 +197,8 @@ impl Root {
};
Some(
div()
- .absolute()
.inset_0()
.when_some(mt, |this, offset| this.mt(offset))
.when_some(mr, |this, offset| this.mr(offset))
.when_some(mb, |this, offset| this.mb(offset))
diff --git a/crates/component/src/window_border.rs b/crates/component/src/window_border.rs
index 9611d0eec0cf..8b873427a1c5 100644
--- a/crates/component/src/window_border.rs
+++ b/crates/component/src/window_border.rs
@@ -270,14 +270,14 @@ impl RenderOnce for WindowBorder {
.when(matches!(decorations, Decorations::Client { .. }), |this| {
let Decorations::Client { tiling, .. } = decorations else {
return this;
};
- this.child(div().absolute().size_full().children(resize_hit_zones(
+ this.children(resize_hit_zones(
window_size,
platform_inset,
resize_hit_size,
&tiling,
- )))
+ ))
})
}
}
I'm experiencing the issue of notification layer taking up everything when trying to inspect element. My used commit is old, 19c21d7d01d57e5423a8b108622573d6b74a6421 .
a976b2caec0d4abafa88fb2ce7636cf58c2af700 is the first bad commit