input transformations

Dan Oscarsson Dan.Oscarsson at tietoenator.com
Fri Mar 16 02:11:16 PDT 2007


tor 2007-02-01 klockan 18:26 -0500 skrev David Reveman:
> 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.

Reading extension documentation are not that easy. When I read about the
composite extension it says nothing about events. I assume this means
that when you redirect a window the pixels are off-screen the event
handling in the server still works as if the redirected windows was on
screen with the same place and size?

Using the composite extension I could get some of the simple things that
was possible in NeWS. I could scale the window to half size (in NeWS you
applied a transformation matrix on the window). This would mean that the
window now is much smaller on screen. If event handling still thinks the
window is full size, mouse events will go to the window event when mouse
is not over the window (as seen on screen).

I do not know if the above input transformation fully fixes this. It is
not just that each window can have its own coordinate space (which could
be 3D), it will due to its transformation matrix also have a different
size/shape - that is, it is a different area on screen that events will
hit than the standard case. I assume you want to have the server do the
event distribution, then the server need to handle not just coordinate
transformation, it also need to handle the effects a window's
transformation matrix have on its positition, shape and size, on screen.

Hope the above gives some ideas on how to handle events.

    Dan




More information about the xorg mailing list