diff --git a/apps/repl/src/cmds/audio.rs b/apps/repl/src/cmds/audio.rs index 0ca217a95..a65eea9b1 100644 --- a/apps/repl/src/cmds/audio.rs +++ b/apps/repl/src/cmds/audio.rs @@ -50,9 +50,9 @@ impl<'a> ShellCmdApi<'a> for Audio { 440.0 }; let mut duration: f32 = if let Some(duration_str) = tokens.next() { - duration_str.parse::().unwrap_or(2.0) + duration_str.parse::().unwrap_or(0.5) } else { - 2.0 + 0.5 }; if duration > 10.0 { duration = 10.0; // sanity check the duration so we don't go nuts diff --git a/apps/repl/src/main.rs b/apps/repl/src/main.rs index e205cfd32..32a7fb145 100644 --- a/apps/repl/src/main.rs +++ b/apps/repl/src/main.rs @@ -31,13 +31,12 @@ fn xmain() -> ! { let xns = xous_names::XousNames::new().unwrap(); // unlimited connections allowed, this is a user app and it's up to the app to decide its policy let sid = xns.register_name(SERVER_NAME_REPL, None).expect("can't register server"); - log::trace!("registered with NS -- {:?}", sid); + // log::trace!("registered with NS -- {:?}", sid); let mut repl = Repl::new(&xns, sid); let mut update_repl = true; let mut was_callback = false; let mut allow_redraw = false; - log::trace!("entering main loop"); loop { let msg = xous::receive_message(sid).unwrap(); log::debug!("got message {:?}", msg); @@ -63,7 +62,6 @@ fn xmain() -> ! { } gam::FocusState::Foreground => { allow_redraw = true; - update_repl = true; } } }), diff --git a/apps/repl/src/repl.rs b/apps/repl/src/repl.rs index ac22b5412..a1ca7ce7c 100644 --- a/apps/repl/src/repl.rs +++ b/apps/repl/src/repl.rs @@ -55,7 +55,7 @@ impl Repl{ gotinput_id: Some(ReplOp::Line.to_u32().unwrap()), audioframe_id: None, rawkeys_id: None, - focuschange_id: Some(ReplOp::Redraw.to_u32().unwrap()), + focuschange_id: Some(ReplOp::ChangeFocus.to_u32().unwrap()), }).expect("couldn't register Ux context for repl"); let content = gam.request_content_canvas(token.unwrap()).expect("couldn't get content canvas"); diff --git a/services/gam/src/contexts.rs b/services/gam/src/contexts.rs index 133726103..cad8fdafb 100644 --- a/services/gam/src/contexts.rs +++ b/services/gam/src/contexts.rs @@ -363,6 +363,7 @@ impl ContextManager { // immutable borrow here can't be combined with mutable borrow below if let Some(old_context) = self.get_context_by_token(self.focused_context.unwrap()) { self.notify_focus_change_to(gam::FocusState::Background, old_context).unwrap(); + log::trace!("lowered focus to: {:?}", old_context); } if let Some(old_context) = self.get_context_by_token_mut(self.focused_context.unwrap()) { old_context.layout.set_visibility_state(leaving_visibility, canvases); @@ -426,7 +427,7 @@ impl ContextManager { self.kbd.set_vibe(context.vibe).expect("couldn't restore keyboard vibe"); self.notify_focus_change_to(gam::FocusState::Foreground, context).unwrap(); - log::debug!("raised focus to: {:?}", context); + log::trace!("raised focus to: {:?}", context); let last_token = context.app_token; self.last_context = self.focused_context; self.focused_context = Some(last_token);