1
0
Fork 0
forked from wry/wry

autocommit 2022-01-08 19:02:10 CET

This commit is contained in:
Julian Orth 2022-01-08 19:02:11 +01:00
parent d061a5c313
commit 3336f1ab6a
37 changed files with 243 additions and 136 deletions

View file

@ -36,9 +36,11 @@ const NAME: u32 = 1;
const POINTER: u32 = 1;
const KEYBOARD: u32 = 2;
#[allow(dead_code)] const TOUCH: u32 = 4;
#[allow(dead_code)]
const TOUCH: u32 = 4;
#[allow(dead_code)] const MISSING_CAPABILITY: u32 = 0;
#[allow(dead_code)]
const MISSING_CAPABILITY: u32 = 0;
pub struct WlSeatGlobal {
name: GlobalName,
@ -178,10 +180,10 @@ impl WlSeatGlobal {
x += Fixed::from_int(ee.x1);
y += Fixed::from_int(ee.y1);
if enter {
self.tl_pointer_event(&tl, |p| p.enter(0, tl.surface.surface.surface.id, x, y))
self.tl_pointer_event(tl, |p| p.enter(0, tl.surface.surface.surface.id, x, y))
.await;
}
self.tl_pointer_event(&tl, |p| p.motion(0, x, y)).await;
self.tl_pointer_event(tl, |p| p.motion(0, x, y)).await;
}
}
@ -237,9 +239,7 @@ impl WlSeatGlobal {
client.event(obj.capabilities()).await?;
{
let mut bindings = self.bindings.borrow_mut();
let bindings = bindings
.entry(client.id)
.or_insert_with(|| Default::default());
let bindings = bindings.entry(client.id).or_insert_with(Default::default);
bindings.insert(id, obj.clone());
}
Ok(())