autocommit 2022-01-08 19:02:10 CET
This commit is contained in:
parent
d061a5c313
commit
3336f1ab6a
37 changed files with 243 additions and 136 deletions
|
|
@ -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(())
|
||||
|
|
|
|||
|
|
@ -18,11 +18,14 @@ const KEY: u32 = 3;
|
|||
const MODIFIERS: u32 = 4;
|
||||
const REPEAT_INFO: u32 = 5;
|
||||
|
||||
#[allow(dead_code)] const NO_KEYMAP: u32 = 0;
|
||||
#[allow(dead_code)]
|
||||
const NO_KEYMAP: u32 = 0;
|
||||
pub(super) const XKB_V1: u32 = 1;
|
||||
|
||||
#[allow(dead_code)] const RELEASED: u32 = 0;
|
||||
#[allow(dead_code)] const PRESSED: u32 = 1;
|
||||
#[allow(dead_code)]
|
||||
const RELEASED: u32 = 0;
|
||||
#[allow(dead_code)]
|
||||
const PRESSED: u32 = 1;
|
||||
|
||||
id!(WlKeyboardId);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ const AXIS_SOURCE: u32 = 6;
|
|||
const AXIS_STOP: u32 = 7;
|
||||
const AXIS_DISCRETE: u32 = 8;
|
||||
|
||||
#[allow(dead_code)] const ROLE: u32 = 0;
|
||||
#[allow(dead_code)]
|
||||
const ROLE: u32 = 0;
|
||||
|
||||
pub(super) const RELEASED: u32 = 0;
|
||||
pub(super) const PRESSED: u32 = 1;
|
||||
|
|
@ -30,10 +31,14 @@ pub(super) const PRESSED: u32 = 1;
|
|||
pub(super) const VERTICAL_SCROLL: u32 = 0;
|
||||
pub(super) const HORIZONTAL_SCROLL: u32 = 1;
|
||||
|
||||
#[allow(dead_code)] const WHEEL: u32 = 0;
|
||||
#[allow(dead_code)] const FINGER: u32 = 1;
|
||||
#[allow(dead_code)] const CONTINUOUS: u32 = 2;
|
||||
#[allow(dead_code)] const WHEEL_TILT: u32 = 3;
|
||||
#[allow(dead_code)]
|
||||
const WHEEL: u32 = 0;
|
||||
#[allow(dead_code)]
|
||||
const FINGER: u32 = 1;
|
||||
#[allow(dead_code)]
|
||||
const CONTINUOUS: u32 = 2;
|
||||
#[allow(dead_code)]
|
||||
const WHEEL_TILT: u32 = 3;
|
||||
|
||||
id!(WlPointerId);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,20 @@ pub use types::*;
|
|||
|
||||
const RELEASE: u32 = 0;
|
||||
|
||||
#[allow(dead_code)] const DOWN: u32 = 0;
|
||||
#[allow(dead_code)] const UP: u32 = 1;
|
||||
#[allow(dead_code)] const MOTION: u32 = 2;
|
||||
#[allow(dead_code)] const FRAME: u32 = 3;
|
||||
#[allow(dead_code)] const CANCEL: u32 = 4;
|
||||
#[allow(dead_code)] const SHAPE: u32 = 5;
|
||||
#[allow(dead_code)] const ORIENTATION: u32 = 6;
|
||||
#[allow(dead_code)]
|
||||
const DOWN: u32 = 0;
|
||||
#[allow(dead_code)]
|
||||
const UP: u32 = 1;
|
||||
#[allow(dead_code)]
|
||||
const MOTION: u32 = 2;
|
||||
#[allow(dead_code)]
|
||||
const FRAME: u32 = 3;
|
||||
#[allow(dead_code)]
|
||||
const CANCEL: u32 = 4;
|
||||
#[allow(dead_code)]
|
||||
const SHAPE: u32 = 5;
|
||||
#[allow(dead_code)]
|
||||
const ORIENTATION: u32 = 6;
|
||||
|
||||
id!(WlTouchId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue