You are not logged in.
Pages: 1
Since upgrading to xorg-server 1.7.1-1 XTestFakeButtonEvent() no longer works for me (used inside a C program).
As far as I can tell by reading the man page for XTestFakeButtonEvent nothing has changed but I want to make sure I am not making some mistake before submitting a bug report so I hope someone can verify that the code I am using is correct and reproduce the bug.
#include <X11/extensions/XTest.h>
int main()
{
Display *dpy;
dpy = XOpenDisplay(NULL);
XTestFakeButtonEvent(dpy, 8, True, CurrentTime);
XTestFakeButtonEvent(dpy, 8, False, CurrentTime);
XCloseDisplay(dpy);
return 0;
}
Compiled using -lXtst .
Here is the error I get:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (XTEST)
Minor opcode of failed request: 2 (X_XTestFakeInput)
Value in failed request: 0x8
Serial number of failed request: 11
Current serial number in output stream: 14
As I said this worked perfectly before I upgraded. Also XTestFakeKeyEvent() still works fine.
Thanks a lot.
Offline
since the value 8 is the one it's complaining about, my guess would be that it now checks the # of buttons of the mouse it sends the event for, which doesn't have 8 buttons?
Do common values (0, 1, 2) work? I'm using it successfully with these values. I'll try again later...
Last edited by Blµb (2009-11-03 17:14:14)
You know you're paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.
Offline
I tried it using 1 and it worked, but my mouse does have a button 8 and 9 , I tested it using xev.
Offline
It works with 1, 2, 3, 4, 5, 6 and 7 but not 0, 8, or 9.
Offline
Pages: 1