[Xcb] Implementing XTestFakeMotionEvent

Julien Cristau jcristau at debian.org
Fri May 1 00:03:33 PDT 2009

On Thu, Apr 30, 2009 at 23:18:32 -0700, Charlls Quarra wrote:

> i want to implement XTestFakeMotionEvent and XTestFakeKeyEvent -like functionality on top of xcb
Each of those is about 3 lines of code on top of the existing
xcb_test_fake_input().  Something like (absolutely untested):

xcb_void_cookie_t xcb_test_fake_motion_event(xcb_connection_t *c, int screen, int x, int y, unsigned long delay) {
        xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(c));
        int i;
        for (i = 0; i < screen; i++)
        return xcb_test_fake_input(c, MotionNotify, 0, delay, screen == -1 ? XCB_NONE : it.data->root, x, y, 0);


More information about the Xcb mailing list