1
0
Fork 0
forked from wry/wry

seat: add cursor groups

This commit is contained in:
Julian Orth 2024-04-30 22:45:07 +02:00
parent dc97827f7a
commit efdca4de49
28 changed files with 629 additions and 401 deletions

View file

@ -156,7 +156,7 @@ pub struct DefaultSetup {
impl DefaultSetup {
pub fn move_to(&self, x: i32, y: i32) {
let (ox, oy) = self.seat.position();
let (ox, oy) = self.seat.pointer_cursor().position();
let (nx, ny) = (Fixed::from_int(x), Fixed::from_int(y));
let (dx, dy) = (nx - ox, ny - oy);
self.mouse.rel(dx.to_f64(), dy.to_f64())

View file

@ -24,7 +24,7 @@ async fn test(run: Rc<TestRun>) -> TestResult {
client.sync().await;
tassert_eq!(
ds.seat.get_desired_known_cursor(),
ds.seat.pointer_cursor().desired_known_cursor(),
Some(KnownCursor::ContextMenu)
);