#include "wayland/internal.h" #include int main(void) { struct wayland_surface w = {0}; struct seat seat = {.ime_focus = &w}; wayland_surface_set_callbacks(&w, NULL, NULL); for (int i = 0; i < 600; i++) { char text[32]; snprintf(text, sizeof(text), "commit-%d", i); text_input_listener.commit_string(&seat, NULL, text); text_input_listener.done(&seat, NULL, (uint32_t)i); assert(!w.ime_commit); } for (int i = 0; i < 600; i++) { char text[32]; snprintf(text, sizeof(text), "commit-%d", i); struct yasl_input_event event; assert(wayland_surface_input_poll(&w, &event)); assert(event.kind == YASL_INPUT_TEXT && event.surface == &w.base); assert(strcmp(event.text.text, text) == 0); } input_queue_clear(&w.input); return 0; }