git.lucas.co / cce-gallery
widget gallery and compositor test bench

commit2f3a3b63475075fe7e41291bd80cbc535dbecbd7
parent5ce0548c80
authorLucas Galante <[email protected]>
date2026-09-08 21:04
fix: a key reaches the focused widget once, not once per roster root

The key sweep propagated the event from every roster root, and the context
routes a key to the focused widget from ANY root — so a Tab-focused slider
took one Right press 58 times over (click focus never showed it: the
gallery's own focused index short-circuits the sweep). Stop at the first
consumer.

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

 src/main.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index a2914bd..a18e39d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1730,6 +1730,11 @@ impl cce_ui::engine::Application for State {
                     // and without this a dropdown that took Escape through
                     // this sweep closed its menu AND exited the app.
                     handled = true;
+                    // And delivered ONCE: the context routes a key to the
+                    // focused widget from ANY root, so without this break a
+                    // Tab-focused slider took one Right press 58 times over —
+                    // once per roster root.
+                    break;
                 }
             }
         }