tree: never focus wl-subsurface surfaces
This commit is contained in:
parent
5afde58086
commit
4584dee160
15 changed files with 150 additions and 35 deletions
|
|
@ -234,6 +234,19 @@ impl Connector for TestConnector {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct TestMouseClick {
|
||||
pub mouse: Rc<TestBackendMouse>,
|
||||
pub button: u32,
|
||||
}
|
||||
|
||||
impl Drop for TestMouseClick {
|
||||
fn drop(&mut self) {
|
||||
self.mouse
|
||||
.common
|
||||
.event(InputEvent::Button(self.button, KeyState::Released));
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TestBackendMouse {
|
||||
pub common: TestInputDeviceCommon,
|
||||
pub transform_matrix: Cell<TransformMatrix>,
|
||||
|
|
@ -252,6 +265,15 @@ impl TestBackendMouse {
|
|||
dy_unaccelerated: Fixed::from_f64(dy),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn click(self: &Rc<Self>, button: u32) -> TestMouseClick {
|
||||
self.common
|
||||
.event(InputEvent::Button(button, KeyState::Pressed));
|
||||
TestMouseClick {
|
||||
mouse: self.clone(),
|
||||
button,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TestBackendKb {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue