1
0
Fork 0
forked from wry/wry

it: test window gains kb focus when mapped

This commit is contained in:
Julian Orth 2022-05-04 14:36:18 +02:00
parent cbf539cbcc
commit c827a93dbb
19 changed files with 672 additions and 39 deletions

View file

@ -9,6 +9,7 @@ use {
testcase!();
/// Test subsurface positioning
async fn test(run: Rc<TestRun>) -> Result<(), TestError> {
run.backend.install_default();

View file

@ -0,0 +1,27 @@
use {
crate::it::{
test_error::{TestError, TestErrorExt},
testrun::TestRun,
},
std::rc::Rc,
};
testcase!();
async fn test(run: Rc<TestRun>) -> Result<(), TestError> {
let ds = run.create_default_setup().await?;
ds.mouse.rel(1.0, 1.0);
let client = run.create_client().await?;
let default_seat = client.get_default_seat().await?;
let enter = default_seat.kb.enter.expect()?;
let window = client.create_window().await?;
window.map().await?;
let enter = enter.next().with_context(|| "Did not enter")?;
tassert_eq!(enter.surface, window.surface.id);
Ok(())
}