it: test natural scrolling
This commit is contained in:
parent
f562f887f0
commit
adf6d2ae2b
12 changed files with 149 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ pub struct TestPointer {
|
|||
pub leave: TEEH<Leave>,
|
||||
pub enter: TEEH<Enter>,
|
||||
pub motion: TEEH<Motion>,
|
||||
pub axis_relative_direction: TEEH<AxisRelativeDirection>,
|
||||
}
|
||||
|
||||
impl TestPointer {
|
||||
|
|
@ -76,6 +77,12 @@ impl TestPointer {
|
|||
let _ev = AxisDiscrete::parse_full(parser)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_axis_relative_direction(&self, parser: MsgParser<'_, '_>) -> TestResult {
|
||||
let ev = AxisRelativeDirection::parse_full(parser)?;
|
||||
self.axis_relative_direction.push(ev);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for TestPointer {
|
||||
|
|
@ -96,6 +103,7 @@ test_object! {
|
|||
AXIS_SOURCE => handle_axis_source,
|
||||
AXIS_STOP => handle_axis_stop,
|
||||
AXIS_DISCRETE => handle_axis_discrete,
|
||||
AXIS_RELATIVE_DIRECTION => handle_axis_relative_direction,
|
||||
}
|
||||
|
||||
impl TestObject for TestPointer {}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ impl TestSeat {
|
|||
leave: Rc::new(Default::default()),
|
||||
enter: Rc::new(Default::default()),
|
||||
motion: Rc::new(Default::default()),
|
||||
axis_relative_direction: Rc::new(Default::default()),
|
||||
});
|
||||
self.tran.add_obj(pointer.clone())?;
|
||||
self.tran.sync().await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue