pointer-constraints: implement cursor position hint
This commit is contained in:
parent
90f791f772
commit
7405e04937
5 changed files with 34 additions and 7 deletions
|
|
@ -30,9 +30,13 @@ impl ZwpLockedPointerV1RequestHandler for ZwpLockedPointerV1 {
|
|||
|
||||
fn set_cursor_position_hint(
|
||||
&self,
|
||||
_req: SetCursorPositionHint,
|
||||
req: SetCursorPositionHint,
|
||||
_slf: &Rc<Self>,
|
||||
) -> Result<(), Self::Error> {
|
||||
let mut x = req.surface_x;
|
||||
let mut y = req.surface_y;
|
||||
client_wire_scale_to_logical!(self.constraint.client, x, y);
|
||||
self.constraint.position_hint.set(Some((x, y)));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue