input transformations
David Reveman
davidr at novell.com
Thu Feb 1 15:26:13 PST 2007
I spent some time this week trying to add support for input
transformations to the server. I tried a few different approaches. The
patches I've attached are what's currently working best for me.
In this approach I allow every window to have it's own root window
coordinate space. A window's root window coordinate space is affected by
all it's ancestors. Composite clients can set a triangular mesh that
maps root window coordinates from a composite window to one of its
redirected child-windows. Event coordinates are generated in the event
windows root coordinate space.
Simple cases where the same root coordinate space is used for all
windows, like when zooming or rotating the desktop works just fine. More
complex cases where each redirected window has a different root
coordinate space like the scale plugin in compiz, which transforms and
tiles all windows so that they don't overlap, also work surprisingly
well but there are some obvious issues. Most of them seem to be things
that need to be fixed on the client side, though. E.g. there's no way to
know which coordinate space to use for override-redirect windows like
tool-tips and menus. The compositing manager can make a decent guess
from the window location but without any hint telling the compositing
manager which top-level window it's related to, it's hard.
Anyhow, I'm not sure my current approach is the best way to allow
interaction with transformed windows but it seems to work pretty well
with what we want to do in compiz. I have a local branch of compiz with
some input transformation hacks, I'll clean it up and push it out in the
next couple of days.
It seems to me like we need to experiment a bit before we can decide
what's the best solution. My current patches are at least something to
start with and I look forward to discussing it more next week at
xdevconf.
- David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compositeproto-input-transform-1.patch
Type: text/x-patch
Size: 1337 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070201/15dbfab9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libXcomposite-input-transform-1.patch
Type: text/x-patch
Size: 3622 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070201/15dbfab9/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xserver-input-transform-1.patch
Type: text/x-patch
Size: 17476 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070201/15dbfab9/attachment-0002.bin>
More information about the xorg
mailing list