widget gallery and compositor test bench
fix: a key consumed by the roster sweep counts as handled
The sweep set only `changed`, while the Escape-quits-app fallback is
gated on !handled - so a dropdown that took Escape through the sweep
path closed its menu AND exited the app.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/main.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main.rs b/src/main.rs
index a4f20c9..725c7b9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2408,6 +2408,11 @@ full screen background.",
let root = self.roster.get_dyn(i).base().id();
if self.ui_context.propagate_event(&key_ev, root) {
changed = true;
+ // A consumed key is HANDLED, not just repaint-worthy: the
+ // Escape-quits-app fallback below is gated on !handled,
+ // and without this a dropdown that took Escape through
+ // this sweep closed its menu AND exited the app.
+ handled = true;
}
}
}