it: test window gains kb focus when mapped
This commit is contained in:
parent
cbf539cbcc
commit
c827a93dbb
19 changed files with 672 additions and 39 deletions
|
|
@ -9,6 +9,7 @@ use {
|
|||
|
||||
testcase!();
|
||||
|
||||
/// Test subsurface positioning
|
||||
async fn test(run: Rc<TestRun>) -> Result<(), TestError> {
|
||||
run.backend.install_default();
|
||||
|
||||
|
|
|
|||
27
src/it/tests/t0008_map_focus.rs
Normal file
27
src/it/tests/t0008_map_focus.rs
Normal 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(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue