05-12-2011
3,
0
Join Date: May 2011
Last Activity: 17 May 2011, 2:42 AM EDT
Posts: 3
Thanks Given: 1
Thanked 0 Times in 0 Posts
Simulating background X11 events
Hi everybody!
I've following this forum for a while but now it is my turn to do a question since a did not find the answer anywhere (I've been searching for days and there is no way).
I am working on a client-server platform where the server renders 3D models and sends images to the client but the client can interact with the models and that interaction is calculated, again, in the server. The client does not know anything about X11 (it can be any platform) but sends messages to the server that are like "pseudo-events" and the server intercepts them and simulate X11 events, i.e. to move the model with a mouse movement simulation. I have to do it this way because being a server has to be transparent to the app below and the only way I found is to make it believe the events are from the user simulating them with Xlib.
The thing is that I would like to simulate events in background. I mean, if I want to move the mouse I want it just for one instance of my server not for the entire O.S.
I have been doing this with XSendEvent or XTestFake* but that is not what I would like because it sends the event for the entire O.S. (and catches it the focused window , normally).
I do not know if to use Xlib is the best way to do that but for now is the only way I know. I am open to any other solution.
I hope I explained myself clearly.
And thank you in advance.