1
0
Fork 0
forked from wry/wry

it: test focus moving

This commit is contained in:
Julian Orth 2022-05-04 15:09:16 +02:00
parent 03b267e51f
commit 23f1aa5a31
7 changed files with 77 additions and 3 deletions

View file

@ -1,6 +1,8 @@
use {
crate::{
backend::InputDeviceId, ifs::wl_seat::SeatId, it::test_error::TestError,
backend::InputDeviceId,
ifs::wl_seat::SeatId,
it::test_error::{TestError, TestResult},
utils::stack::Stack,
},
isnt::std_1::primitive::IsntConstPtrExt,
@ -11,6 +13,7 @@ use {
ConfigEntry, VERSION,
},
input::{InputDevice, Seat},
Direction,
},
std::{cell::Cell, ops::Deref, ptr, rc::Rc},
};
@ -171,6 +174,13 @@ impl TestConfig {
})
}
pub fn focus(&self, seat: SeatId, direction: Direction) -> TestResult {
self.send(ClientMessage::Focus {
seat: Seat(seat.raw() as _),
direction,
})
}
fn clear(&self) {
unsafe {
if let Some(srv) = self.srv.take() {