diff --git a/services/graphics-server/src/api.rs b/services/graphics-server/src/api.rs index 865dad826..e9c326179 100644 --- a/services/graphics-server/src/api.rs +++ b/services/graphics-server/src/api.rs @@ -267,9 +267,9 @@ impl<'a> Into for Opcode<'a> { } Opcode::SetCursor(c) => Message::Scalar(ScalarMessage { id: 12, - arg1: c.pt.x, - arg2: c.pt.y, - arg3: c.line_height, + arg1: c.pt.x as usize, + arg2: c.pt.y as usize, + arg3: c.line_height as usize, arg4: 0, }), Opcode::GetCursor => Message::BlockingScalar(ScalarMessage { diff --git a/services/graphics-server/src/api/shapes.rs b/services/graphics-server/src/api/shapes.rs index 5029630ad..fe2d675ff 100644 --- a/services/graphics-server/src/api/shapes.rs +++ b/services/graphics-server/src/api/shapes.rs @@ -126,7 +126,7 @@ impl Rectangle { impl Into for Rectangle { fn into(self) -> ClipRect { - ClipRect::new(self.x0(), self.y0(), self.x1(), self.y1()) + ClipRect::new(self.x0() as u32, self.y0() as u32, self.x1() as u32, self.y1() as u32) } } diff --git a/services/graphics-server/src/lib.rs b/services/graphics-server/src/lib.rs index a4c93230a..7d2901171 100644 --- a/services/graphics-server/src/lib.rs +++ b/services/graphics-server/src/lib.rs @@ -48,7 +48,7 @@ pub fn get_cursor(cid: CID) -> Result { let response = send_message(cid, api::Opcode::GetCursor.into())?; if let xous::Result::Scalar2(pt_as_usize, h) = response { let p: Point = pt_as_usize.into(); - Ok(Cursor::new(p.x as usize, p.y as usize, h as _)) + Ok(Cursor::new(p.x as u32, p.y as u32, h as _)) } else { panic!("unexpected return value: {:#?}", response); } diff --git a/services/graphics-server/src/main.rs b/services/graphics-server/src/main.rs index fc309258d..ce3b1d3ed 100644 --- a/services/graphics-server/src/main.rs +++ b/services/graphics-server/src/main.rs @@ -105,7 +105,7 @@ fn xmain() -> ! { Opcode::GetCursor => { let pt: api::Point = api::Point::new(current_cursor.pt.x as i16, current_cursor.pt.y as i16); - xous::return_scalar2(msg.sender, pt.into(), current_cursor.line_height) + xous::return_scalar2(msg.sender, pt.into(), current_cursor.line_height as usize) .expect("GFX: could not return GetCursor request"); } Opcode::SetStringClipping(r) => {