it: test cursor-shape protocol
This commit is contained in:
parent
9c8131e145
commit
6448a14fb1
10 changed files with 154 additions and 2 deletions
32
src/it/tests/t0030_cursor_shape.rs
Normal file
32
src/it/tests/t0030_cursor_shape.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
use {
|
||||
crate::{
|
||||
cursor::KnownCursor,
|
||||
it::{test_error::TestResult, testrun::TestRun},
|
||||
},
|
||||
std::rc::Rc,
|
||||
};
|
||||
|
||||
testcase!();
|
||||
|
||||
async fn test(run: Rc<TestRun>) -> TestResult {
|
||||
let ds = run.create_default_setup().await?;
|
||||
|
||||
let client = run.create_client().await?;
|
||||
|
||||
let seat = client.get_default_seat().await?;
|
||||
let dev = client.cursor_shape_manager.get_pointer(&seat.pointer)?;
|
||||
let enter = seat.pointer.enter.expect()?;
|
||||
|
||||
let win1 = client.create_window().await?;
|
||||
win1.map2().await?;
|
||||
|
||||
dev.set_shape(enter.last()?.serial, 2)?;
|
||||
client.sync().await;
|
||||
|
||||
tassert_eq!(
|
||||
ds.seat.get_desired_known_cursor(),
|
||||
Some(KnownCursor::ContextMenu)
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue