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.

I find it difficult to believe that the only way to use this application is to fake mouse clicks. What is it?

1 Like

Acually it is something like X11 redirection to a remote host, it is that the application you are running is a normal app that can be executed remotely.
I want something similar but in my case the client does not understand about X11 so I need to simulate the events to do the app to behave as usual without changing the code at all.

May be I was not clear enough. I need to do it with fake events because the client does not work with X11. And I would like the events to be submitted to only one specific instance of the server each time that's why I need them to be in background.

And thank you for your reply!