mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
minor fixes, push for CI check
This commit is contained in:
parent
b4a34bd9ec
commit
3b6a696fc4
4 changed files with 13 additions and 8 deletions
|
|
@ -62,7 +62,7 @@ impl Canvas {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Canvas {
|
Canvas {
|
||||||
clip_rect, trust_level, state: CanvasState::OffScreenNotDrawable, gid: Gid::new(gid), pan_offset: Point::new(0, 0),
|
clip_rect, trust_level, state: CanvasState::OffScreenDrawable, gid: Gid::new(gid), pan_offset: Point::new(0, 0),
|
||||||
canvas_type,
|
canvas_type,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -75,7 +75,7 @@ impl Canvas {
|
||||||
}
|
}
|
||||||
pub fn pan_offset(&self) -> Point { self.pan_offset }
|
pub fn pan_offset(&self) -> Point { self.pan_offset }
|
||||||
pub fn clip_rect(&self) -> Rectangle { self.clip_rect }
|
pub fn clip_rect(&self) -> Rectangle { self.clip_rect }
|
||||||
pub fn set_clip(&mut self, cr: Rectangle) { self.clip_rect = cr; self.state = CanvasState::OffScreenNotDrawable }
|
pub fn set_clip(&mut self, cr: Rectangle) { self.clip_rect = cr; self.state = CanvasState::OffScreenDrawable }
|
||||||
pub fn gid(&self) -> Gid { self.gid }
|
pub fn gid(&self) -> Gid { self.gid }
|
||||||
pub fn trust_level(&self) -> u8 { self.trust_level }
|
pub fn trust_level(&self) -> u8 { self.trust_level }
|
||||||
pub fn set_trust_level(&mut self, level: u8) {self.trust_level = level;}
|
pub fn set_trust_level(&mut self, level: u8) {self.trust_level = level;}
|
||||||
|
|
|
||||||
|
|
@ -515,7 +515,8 @@ impl ContextManager {
|
||||||
if let Some(menu_token) = self.find_app_token_by_name(MAIN_MENU_NAME) {
|
if let Some(menu_token) = self.find_app_token_by_name(MAIN_MENU_NAME) {
|
||||||
// set the menu to the active context
|
// set the menu to the active context
|
||||||
match self.activate(gfx, canvases, menu_token, false) {
|
match self.activate(gfx, canvases, menu_token, false) {
|
||||||
_ => log::warn!("Couldn't raise menu, user will have to try again."),
|
Ok(_) => (),
|
||||||
|
Err(_) => log::warn!("Couldn't raise menu, user will have to try again."),
|
||||||
}
|
}
|
||||||
// don't pass the initial key hit back to the menu app, just eat it and return
|
// don't pass the initial key hit back to the menu app, just eat it and return
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -494,7 +494,8 @@ fn xmain() -> ! {
|
||||||
if let Some(menu_token) = context_mgr.find_app_token_by_name(MAIN_MENU_NAME) {
|
if let Some(menu_token) = context_mgr.find_app_token_by_name(MAIN_MENU_NAME) {
|
||||||
if menu_token == switchapp.token {
|
if menu_token == switchapp.token {
|
||||||
match context_mgr.activate(&gfx, &mut canvases, new_app_token, false) {
|
match context_mgr.activate(&gfx, &mut canvases, new_app_token, false) {
|
||||||
_ => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
Ok(_) => (),
|
||||||
|
Err(_) => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -502,7 +503,8 @@ fn xmain() -> ! {
|
||||||
if let Some(modal_token) = context_mgr.find_app_token_by_name(ROOTKEY_MODAL_NAME) {
|
if let Some(modal_token) = context_mgr.find_app_token_by_name(ROOTKEY_MODAL_NAME) {
|
||||||
if modal_token == switchapp.token {
|
if modal_token == switchapp.token {
|
||||||
match context_mgr.activate(&gfx, &mut canvases, new_app_token, false) {
|
match context_mgr.activate(&gfx, &mut canvases, new_app_token, false) {
|
||||||
_ => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
Ok(_) => (),
|
||||||
|
Err(_) => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -510,7 +512,8 @@ fn xmain() -> ! {
|
||||||
if let Some(token) = context_mgr.find_app_token_by_name(gam::STATUS_BAR_NAME) {
|
if let Some(token) = context_mgr.find_app_token_by_name(gam::STATUS_BAR_NAME) {
|
||||||
if token == switchapp.token {
|
if token == switchapp.token {
|
||||||
match context_mgr.activate(&gfx, &mut canvases, new_app_token, true) {
|
match context_mgr.activate(&gfx, &mut canvases, new_app_token, true) {
|
||||||
_ => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
Ok(_) => (),
|
||||||
|
Err(_) => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -518,7 +521,8 @@ fn xmain() -> ! {
|
||||||
// this message came from ourselves
|
// this message came from ourselves
|
||||||
if gam_token == switchapp.token {
|
if gam_token == switchapp.token {
|
||||||
match context_mgr.activate(&gfx, &mut canvases, new_app_token, true) {
|
match context_mgr.activate(&gfx, &mut canvases, new_app_token, true) {
|
||||||
_ => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
Ok(_) => (),
|
||||||
|
Err(_) => log::warn!("failed to switch to {}, silent error!", switchapp.app_name.as_str().unwrap()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -471,7 +471,7 @@ fn xmain() -> ! {
|
||||||
let tt = ticktimer_server::Ticktimer::new().unwrap();
|
let tt = ticktimer_server::Ticktimer::new().unwrap();
|
||||||
#[cfg(not(any(windows, unix)))] // skip this step if running in hosted mode, for now...
|
#[cfg(not(any(windows, unix)))] // skip this step if running in hosted mode, for now...
|
||||||
if pddb_os.rootkeys_initialized() {
|
if pddb_os.rootkeys_initialized() {
|
||||||
tt.sleep_ms(1000).unwrap(); // wait 1 second after boot before attempting to mount, to let the boot screen finish redrawing (cometic issue).
|
tt.sleep_ms(1000).unwrap(); // wait after boot before attempting to mount, to let the boot screen finish redrawing (cosmetic issue).
|
||||||
match ensure_password(&modals, &mut pddb_os) {
|
match ensure_password(&modals, &mut pddb_os) {
|
||||||
PasswordState::Correct => {
|
PasswordState::Correct => {
|
||||||
try_mount_or_format(&modals, &mut pddb_os, &mut basis_cache, PasswordState::Correct);
|
try_mount_or_format(&modals, &mut pddb_os, &mut basis_cache, PasswordState::Correct);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue