mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
emit a warning if apps don't recognize focus changes, instead of a panic
This commit is contained in:
parent
66ca91dd6e
commit
b936414d11
1 changed files with 2 additions and 1 deletions
|
|
@ -495,7 +495,8 @@ fn xmain() -> ! {
|
||||||
for switchers in authorized_switchers {
|
for switchers in authorized_switchers {
|
||||||
if let Some(auth_token) = context_mgr.find_app_token_by_name(switchers) {
|
if let Some(auth_token) = context_mgr.find_app_token_by_name(switchers) {
|
||||||
if auth_token == switchapp.token {
|
if auth_token == switchapp.token {
|
||||||
context_mgr.notify_app_switch(new_app_token).expect("couldn't send focus swap notifications!");
|
context_mgr.notify_app_switch(new_app_token)
|
||||||
|
.unwrap_or_else(|_| {log::warn!("Application does not recognize focus changes")});
|
||||||
match context_mgr.activate(&gfx, &mut canvases, new_app_token, false) {
|
match context_mgr.activate(&gfx, &mut canvases, new_app_token, false) {
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
Err(_) => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
Err(_) => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue