Window Manager: Intercepting mouse events

Rémi Cardona remi at gentoo.org
Thu Jan 15 23:38:35 PST 2009


Le 16/01/2009 02:02, Bipin George Mathew a écrit :
> Is it possible to use a combination of XGrabButton on the root window
> and use XSendEvent to send the transformed co-ordinates?

Here's a snippet of XSendEvent's man page :

---
The XSendEvent function identifies the destination window, determines 
which clients should receive the specified events, and ignores any 
active grabs.
---

It's still the server that determines which window gets the event. In a 
composited server, either the server needs to know the 3D geometry of 
each window (which I think is a bad idea), or you need to be able to 
specify which top-level window will receive the event.

But I think with XGrabButton and XSendEvent, you'll run into other 
problems, such as receiving the input you've generated yourself. So for 
every click, you would have to Ungrab, SendEvent and Grab again... At 
least, that's how I understand it.

Cheers

-- 
Rémi Cardona
LRI, INRIA
remi.cardona at lri.fr
remi at gentoo.org



More information about the xorg mailing list