summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-12-11 22:00:50 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-12-11 23:57:44 -0500
commitd001ebc77bc68bc844758f221495431cb83e1d26 (patch)
tree803572c47fd5a0746f2d07b9b37653496f1ebffb
parenta1ada26c2b9155c929a14435523ab35bab5010be (diff)
downloadweston-d001ebc77bc68bc844758f221495431cb83e1d26.tar.gz
keyboard-test: Use wl_display_roundtrip() instead of yield()
As for button-test, a wl_display_roundtrip is sufficient here. The yield() between wl_test_activate_surface() and wl_test_send_key() is also not needed, since the two requests will arrive at the server in order, and will activate the surface first, then send a key event.
-rw-r--r--tests/keyboard-test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/keyboard-test.c b/tests/keyboard-test.c
index 353dde2e..3d5d6e3c 100644
--- a/tests/keyboard-test.c
+++ b/tests/keyboard-test.c
@@ -44,24 +44,22 @@ TEST(simple_keyboard_test)
expect_state = WL_KEYBOARD_KEY_STATE_RELEASED;
wl_test_send_key(client->test->wl_test, expect_key,
expect_state);
- yield(client);
} else if (keyboard->focus) {
expect_focus = NULL;
wl_test_activate_surface(client->test->wl_test,
NULL);
- yield(client);
} else if (expect_key < 10) {
expect_key++;
expect_focus = client->surface;
expect_state = WL_KEYBOARD_KEY_STATE_PRESSED;
wl_test_activate_surface(client->test->wl_test,
expect_focus->wl_surface);
- yield(client);
wl_test_send_key(client->test->wl_test, expect_key,
expect_state);
- yield(client);
} else {
break;
}
+
+ wl_display_roundtrip(client->wl_display);
}
}