Input transformations: Compiz
joel.bosveld at gmail.com
Tue Jan 20 20:01:18 PST 2009
On Wed, Jan 21, 2009 at 11:57 AM, Bipin George Mathew <bipingm at gmail.com>wrote:
> Given that the upstream compiz does not use David's APIs, how is the
> zoom plugin able to translate the co-ordinates for ButtonPress?
> While looking at the compiz code, I did find XGrabButton was called on
> each window created to intercept the events; but I was expecting an
> XSendEvent with the ButtonPressMask to be called with the transformed
> co-ordinates- which I not find. Also, I read on the mailinglist that
> clients can ignore synth events of XSendEvent.
> Any pointers on how this translation is done?
>From the comments at the top of the code:
Note on input
We can not redirect input yet, but this plug-in offers two
approaches to achieve input enabled zoom:
1. Always have the zoomed area be in sync with the mouse cursor. This binds
the zoom area to the mouse position at any given time. It allows using the
original mouse cursor drawn by X, and is technically very safe. First used
in Beryl's inputzoom.
2. Hide the real cursor and draw our own where it would be when zoomed in. This
allows us to navigate with the mouse without constantly moving the zoom
area. This is fairly close to what we want in the end when input redirection
This second method has one huge issue, which is bugged XFixes. After hiding
the cursor once with XFixes, some mouse cursors will simply be invisible.
The Firefox loading cursor being one of them. An other minor annoyance is
that mouse sensitivity seems to increase as
you zoom in, since the mouse isn't really zoomed at all.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xorg