<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font color="black">Dear Böszörményi Zoltán,</font><br>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Thank you for sharing
"touchscreen-transform" program and giving a detailed
explanation of it.<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> assumes they are
put side by side. <br>
> The output is a series of floats that is the
TransformationMatrix</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">I found that the
program is very handy to calculate transformation matrix values<br>
</font></div>
<div class="moz-signature"><font color="black">when the screens are
put side by side in x direction and top-aligned in y direction.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">The remaining problem
is how to calculate the transformation matrix values <br>
</font></div>
<div class="moz-signature"><font color="black"><font color="black">for
multiple screens </font>with one graphic card using
ZaphodHeads option <br>
</font></div>
<div class="moz-signature"><font color="black">when the origin of
each screen is (0,0) as shown below:<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black"> [xorg.conf]<br>
</font></div>
<div class="moz-signature"><font color="black"> Section
"ServerLayout"<br>
Screen 0 "Screen0" 0 0 # DISPLAY=":0.0"<br>
Screen 1 "Screen1" 0 0 # DISPLAY=":0.1"<br>
EndSection</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">I told my customer
that the screens should not overlap and have different origins.<br>
</font></div>
<div class="moz-signature"><font color="black">However, my customer
is saying that they are independent screens and do not overlap
even when the origins are all (0,0).<br>
</font></div>
<div class="moz-signature"><font color="black">How can I transform
the input touch positions properly in this environment?<br>
</font></div>
<div id="rwhMsgHeader"><br>
<font color="black">Best regards,<br>
Hugh Chang</font><br>
<hr id="rwhMsgHdrDivider" style="border:0;border-top:1px solid
#B5C4DF;padding:0;margin:10px 0 5px 0;width:100%;">
<div style="font-family:Tahoma !important; color:#000000
!important; font-size:13px !important;"><b>From:</b> Böszörményi
Zoltán [<a class="moz-txt-link-freetext"
href="mailto:zboszor@pr.hu">mailto:zboszor@pr.hu</a>]</div>
<div style="font-family:Tahoma !important; color:#000000
!important; font-size:13px !important;"><b>Sent:</b> Thursday,
July 23, 2020, 02:47</div>
<div style="font-family:Tahoma !important; color:#000000
!important; font-size:13px !important;"><b>To:</b> Hugh Chang; <a
class="moz-txt-link-abbreviated"
href="mailto:xorg@lists.x.org">xorg@lists.x.org</a></div>
<div style="font-family:Tahoma !important; color:#000000
!important; font-size:13px !important;"><b>Subject:</b>
[Question] ZaphodHeads, ServerLayout without position
information, and touchscreens</div>
<br>
</div>
<blockquote type="cite"
cite="mid:cb9f01c0-eab5-ae53-4174-746faf05be0b@pr.hu"
style="border:none !important; margin-left:0px !important;
margin-right:0px !important; margin-top:0px !important;
padding-left:0px !important; padding-right:0px !important">Hi, <br>
<br>
2020. 07. 17. 9:44 keltezéssel, Hugh Chang írta: <br>
<blockquote type="cite">Dear all, <br>
<br>
I'm writing a document to guide how to configure xorg.conf for
multiple touchscreens as attached. <br>
I think that I've almost finished it but I don't know how to
configure xorg.conf <br>
when ServerLayout is described without position information for
multi-seat setup with one graphic card (zaphod heads). <br>
I could not find a proper solution and I'm asking your advice. <br>
I'll greatly appreciate for any hint from you. <br>
</blockquote>
<br>
for dynamic seats, simply there is no solution. <br>
<br>
The "xinput map-to-output ..." command would be nice but <br>
1) it needs that Xorg has already started so preset configuration
is out of question, and <br>
2) it doesn't survive hotplugging if the touchscreen device is USB
based. <br>
<br>
For fixed configuration, I have solved this a while ago. <br>
<br>
What you need is xorg.conf template files for sed substitutions
and this utility: <br>
<a class="moz-txt-link-freetext"
href="https://github.com/zboszor/touchscreen-transform">https://github.com/zboszor/touchscreen-transform</a>
, formerly known as <br>
<a class="moz-txt-link-freetext"
href="https://github.com/SICOM/touchscreen-transform">https://github.com/SICOM/touchscreen-transform</a>
<br>
<br>
Full disclosure: this utility blatantly copied the xinput 1.6.2
code <br>
for computing the values for Option TransformationMatrix. <br>
<br>
========================================================== <br>
$ ./touchscreen-transform <br>
Usage: ./touchscreen-transform [-i index] { -r NxM [-R
{normal|left|right|inverted}] ... } <br>
-r, --resolution NxM <br>
screen resolution <br>
-R, --rotation {normal|left|right|inverted} <br>
screen rotation <br>
-i index <br>
For multi-screen setup, the touchscreen is <br>
attached to the (zero based) indexth screen <br>
Options -r and -R are positional and can be repeated. <br>
========================================================== <br>
<br>
The utility takes a series of -r (resolution) and -R (rotation) <br>
options and an index for the 0 based array of screens/monitors <br>
forming the whole canvas X works on and assumes they are put side
by side. <br>
<br>
The output is a series of floats that is the TransformationMatrix
<br>
you can use for the touchscreen attached to the ith monitor. <br>
See the INPUTDEVICE SECTION in man 5 xorg.conf about Option <br>
TransformationMatrix. <br>
<br>
E.g.: <br>
<br>
$ ./touchscreen-transform -r 1024x768 -r 1024x768 -i 1 <br>
0.50000 0.00000 0.50000 0.00000 1.00000 0.00000 0.00000 0.00000
1.00000 <br>
<br>
For completing the configuration (e.g. binding the input device
properly <br>
to a given USB slot) is left to you to discover. "man 5
xorg.conf", "man 4 evdev" <br>
and "man 4 libinput" should have everything you need. <br>
<br>
Best regards, <br>
Zoltán Böszörményi <br>
<br>
<blockquote type="cite"> <br>
Best regards, <br>
Hugh Chang <br>
<br>
_______________________________________________ <br>
<a class="moz-txt-link-abbreviated"
href="mailto:xorg@lists.x.org">xorg@lists.x.org</a>: X.Org
support <br>
Archives: <a class="moz-txt-link-freetext"
href="http://lists.freedesktop.org/archives/xorg">http://lists.freedesktop.org/archives/xorg</a>
<br>
Info: <a class="moz-txt-link-freetext"
href="https://lists.x.org/mailman/listinfo/xorg">https://lists.x.org/mailman/listinfo/xorg</a>
<br>
Your subscription address: %(user_address)s <br>
<br>
</blockquote>
<br>
</blockquote>
</body>
</html>