@@ -87,7 +87,9 @@ pub fn poll(s: &mut State, _t: f64, tx: &mut Tx) -> bool {
8787 s.live.save();
8888 if s.live.animating() { tx.wake_after(Duration::from_millis(16)); }
8989 restart(s);
90- again
90+ let ctrl = s.ctrl;
91+ on_modifiers(s, tx.mods(), tx);
92+ again || ctrl != s.ctrl
9193 }
9294
9395 /// Gives each new widget kind a finished build made a place: the widget clicked takes it, or
@@ -122,7 +124,10 @@ fn restart(s: &mut State) {
122124 s.built = Some(t);
123125 }
124126
127+/// Ctrl went down or up. Rune's desktop host doesn't call `App::on_modifiers` yet (window.rs
128+/// never hands it to the runtime), so pointer moves and polls also report Ctrl here.
125129 pub fn on_modifiers(s: &mut State, mods: rune::Mods, tx: &mut Tx) {
130+ if mods.ctrl == s.ctrl { return; }
126131 s.ctrl = mods.ctrl;
127132 if s.ctrl { inspect::pick(s, tx); }
128133 }
@@ -130,8 +135,12 @@ pub fn on_modifiers(s: &mut State, mods: rune::Mods, tx: &mut Tx) {
130135 pub fn view(s: &State, rcx: &mut rune::Cx<State>) -> El {
131136 let mut app = el().key("app").w_full().h_full()
132137 .child(el().key("content").w_full().h_full().child(s.live.render("root", "root"))
133- .on_pointer_move_local(|s: &mut State, e: rune::PointerEvent, tx: &mut Tx| { s.pointer = (e.window_x, e.window_y); tx.live_only(); }));
138+ .on_pointer_move_local(|s: &mut State, e: rune::PointerEvent, tx: &mut Tx| {
139+ s.pointer = (e.window_x, e.window_y);
140+ if tx.mods().ctrl { on_modifiers(s, tx.mods(), tx) } else { tx.live_only() }
141+ }));
142+ app = app.child(status::view(s));
134143 if s.ctrl && s.form.is_none() { app = app.child(inspect::view(s, rcx)); }
135144 if let Some(f) = &s.form { app = app.child(form::view(s, f, rcx)); }
136- app.child(status::view(s))
145+ app
137146 }