Go to file
Peter Korsgaard 6cccf0131c dix: add 3x3 transformation matrix xinput property for multi-head handling
For absolute input devices (E.G. touchscreens) in multi-head setups,
we need a way to bind the device to an randr output. This adds the
infrastructure to the server to allow us to do so.

positionSprite() scales input coordinates to the dimensions of the shared
(total) screen frame buffer, so to restrict motion to an output we need to
scale/rotate/translate device coordinates to a subset of the frame buffer
before passing them on to positionSprite.

This is done here using a 3x3 transformation matrix, which is applied to
the device coordinates using homogeneous coordinates, E.G.:

[ c0 c1 c2 ]   [ x ]
[ c3 c4 c5 ] * [ y ]
[ c6 c7 c8 ]   [ 1 ]

Notice: As input devices have varying input ranges, the coordinates are
first scaled to the [0..1] range for generality, and afterwards scaled
back up.

E.G. for a dual head setup (using same resolution) next to each other, you
would want to scale the X coordinates of the touchscreen connected to the
both heads by 50%, and translate (offset) the coordinates of the rightmost
head by 50%, or in matrix form:

   left:            right:
[ 0.5 0 0 ]     [ 0.5 0 0.5 ]
[ 0   1 0 ]     [ 0   1 0   ]
[ 0   0 1 ]     [ 0   0 0   ]

Which can be done using xinput:

xinput set-prop <left> --type=float "Coordinate Transformation Matrix" \
       0.5 0 0 0 1 0 0 0 1

xinput set-prop <right> --type=float "Coordinate Transformation Matrix" \
       0.5 0 0.5 0 1 0 0 0 1

Likewise more complication setups involving more heads, rotation or
different resolution can be handled.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-28 16:49:30 +10:00
composite Return an appropriately-typed error from dixLookupResourceByType. 2010-05-19 12:32:48 -07:00
config Revert "Add a "flags" field to DeleteInputDeviceRequest." 2010-05-26 07:54:35 -07:00
damageext Add typed resource-lookup errors for non-core resource types. 2010-05-19 12:32:48 -07:00
dbe Add typed resource-lookup errors for non-core resource types. 2010-05-19 12:32:48 -07:00
dix dix: add 3x3 transformation matrix xinput property for multi-head handling 2010-05-28 16:49:30 +10:00
doc Xserver(1) man page updates 2010-05-21 09:44:26 -07:00
exa EXA: Wrap Glyphs even without Composite acceleration. 2010-05-20 07:48:51 -07:00
fb Replace dixChangeGC with calls directly to the right variant. 2010-05-13 17:14:07 -07:00
glx Set event sequence number in WriteEventsToClient instead of at callers. 2010-05-19 12:32:34 -07:00
hw xfree86: bump ABI_XINPUT_VERSION to 11. 2010-05-26 19:34:22 -07:00
include dix: add 3x3 transformation matrix xinput property for multi-head handling 2010-05-28 16:49:30 +10:00
m4 dolt: add Cygwin to supported platforms 2009-10-13 20:30:22 -07:00
mi midispcur: Construct Picture objects lazily in case Render is disabled. 2010-05-25 09:05:37 -07:00
miext Define GCAllBits as the union of all valid CreateGC masks. 2010-05-13 17:14:07 -07:00
os Make WriteEventsToClient/WriteToClient no-op on fake or dead clients. 2010-05-19 12:32:34 -07:00
randr Add typed resource-lookup errors for non-core resource types. 2010-05-19 12:32:48 -07:00
record Add typed resource-lookup errors for non-core resource types. 2010-05-19 12:32:48 -07:00
render Merge remote branch 'vignatti/animcursor-state-fix' 2010-05-19 22:27:20 -07:00
test Ignore build products in the server's test suite. 2010-05-26 11:17:53 -07:00
Xext xf86bigfont: Silence compiler warning by initializing pDesc. 2010-05-26 11:10:27 -07:00
xfixes xfixes: Remove the invisible cursor sprite, using NullCursor instead. 2010-05-24 22:15:14 -07:00
Xi dix: add 3x3 transformation matrix xinput property for multi-head handling 2010-05-28 16:49:30 +10:00
xkb Set event sequence number in WriteEventsToClient instead of at callers. 2010-05-19 12:32:34 -07:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac Show Xserver release/version date in DIX & DDX docs 2010-05-20 11:31:13 -07:00
COPYING Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00
cpprules.in xfree86: Set a saner search path for xorg.conf.d 2010-04-08 15:21:01 +10:00
Makefile.am Fix relink targets for silent rules 2010-03-22 00:45:52 -05:00
README packaging: provide a default README file #24206 2010-01-27 14:00:17 -08:00
xorg-server.m4 macros: use PKG_CONFIG variable rather than executable name 2010-01-07 12:57:23 -08:00
xorg-server.pc.in xorg-server.pc Requires: xproto >= 7.0.17 2010-05-22 20:12:41 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage