[Xcb] An xcb/xtest newbie question
Jon Shemitz
jshemitz at sta.samsung.com
Mon Oct 11 11:03:22 PDT 2010
I am trying to use xtest to fake keyboard and mouse events. My daemon seems to connect to X via xcb just fine: xcb_connect(NULL, NULL) returns a non-NULL xcb_window_t. I can call xcb_get_setup and xcb_setup_roots_iterator and get a root window handle that agrees with xwininfo. But I am having no luck at all with xcb_test_fake_input.
I call
xcb_void_cookie_t cookie =
xcb_test_fake_input(xcb,
/* type */ MOTION_NOTIFY, /*=6*/
/* detail */ 0, //relative ? 1 : 0,
/* time */ 0,//time(NULL),
/* root */ xcb_root_window,
/* rootX */ x,
/* rootY */ y,
/* deviceid */ 0);
... and nothing happens.
The same thing happens when I try to fake key input:
xcb_test_fake_input(xcb,
/* type */ press
? KEY_PRESS /*3*/ : KEY_RELEASE /*4*/,
/* detail */ keycode,
/* time */ 0,
/* root */ 0,
/* rootX */ 0,
/* rootY */ 0,
/* deviceid */ 0);
I imagine there's a key concept or two that I am missing here - any help would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20101011/1fab36ea/attachment.html>
More information about the Xcb
mailing list