git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit4f766a2dcf9354d19813774b491c62526929862c
parentd08519918c
authorLucas Galante <[email protected]>
date2026-07-06 21:30
Populate overlay_rects in window_runner text_areas using active popovers from ui_context

 src/backend/window_runner.rs | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index e665591..0548ccd 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -1376,7 +1376,18 @@ pub trait Application: Sized + 'static {
     }
     
     fn text_areas(&self, scale_f32: f32, bounds: TextBounds) -> Vec<TextArea<'_>> {
-        let overlay_rects: Vec<(f32, f32, f32, f32)> = Vec::new();
+        let mut overlay_rects: Vec<(f32, f32, f32, f32)> = Vec::new();
+        if let Some(ctx) = self.ui_context() {
+            for popover_ptr in &ctx.active_popovers {
+                unsafe {
+                    if let Some(popover) = popover_ptr.as_ref() {
+                        if let Some((x, y, w, h)) = popover.popover_rect() {
+                            overlay_rects.push((x, y, w, h));
+                        }
+                    }
+                }
+            }
+        }
 
         self.text_items().iter().map(|ti| {
             let mut item_bounds = if let Some([l, t, r, b]) = ti.bounds {