git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commit7517773ca9283913e02bb72f353ae0083942df5e
parent8ad1a02682
authorLucas Galante <[email protected]>
date2026-09-20 22:36
Dialog: note the scroll gesture before dispatching a wheel to a pane

dispatch_uncovered goes straight to handle_event, bypassing the router's
gesture bookkeeping; the Settings list inherited the main pane's gesture
state and let the control under the pointer eat a fresh finger scroll.
Reproduced and re-verified in a shadow with injected finger scrolls.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

 src/dialog.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/dialog.rs b/src/dialog.rs
index 39e0b14..2186480 100644
--- a/src/dialog.rs
+++ b/src/dialog.rs
@@ -1372,6 +1372,12 @@ impl State {
         // cache, and the engine makes one on every left press
         // (`close_popovers_missed_by_press`).
         self.ui_context.invalidate_coverage_cache();
+        // Straight to handle_event, not propagate_event: so the gesture
+        // bookkeeping the router would have done is done here, or the
+        // dialog's panes inherit the main pane's gesture state.
+        if matches!(ev, cce_ui::widget::Event::MouseWheel { .. }) {
+            self.ui_context.note_scroll_event();
+        }
         let ptr = self.slots.get_dyn_mut(idx) as *mut (dyn cce_ui::widget::WidgetHost + 'static);
         let taken = unsafe { (*ptr).handle_event(ev, &mut self.ui_context) };
         self.slots.dialog.set_occluding(true);