[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: Is it possible to pan around a virtual screen using a smaller touchscreen display
From:       Daniel Harris <mail.dharris () googlemail ! com>
Date:       2015-04-22 13:50:19
Message-ID: CANsePAtjJZNzVg3o6O0Zcsq_p_+cuHtU9ripGEYCUCfDh_JyBg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks Peter

I appreciate your time and help and I will look into it

Dan



On Tue, Apr 21, 2015 at 10:38 PM, Peter Hutterer <peter.hutterer@who-t.net>
wrote:

> On Tue, Apr 21, 2015 at 02:50:47PM +0100, Daniel Harris wrote:
> > Hello Peter
> >
> > I appreciate your reply.  I am not sure we are talking about the same
> thing
> > so I have uploaded a video to youtube showing the problem i am
> experiencing
> >
> > If anyone is interested you can find it here http://youtu.be/n8N0NnB9u7g
>
> yeah, definitely the same thing. look at the distances of the pointer and
> the stylus relative to their origins - when the stylus is half-way down the
> device, the pointer is half-way down the whole screen. That's the basic
> problem - an absolute device is always mapped to the whole screen/desktop
> area.
>
> > are you saying the pointer position can be corrected with a client app or
> > can it only be fixed in X.
>
> yes, google for xinput coordinate transformation matrix and you'll find a
> few tutorials, hints on how to do it. xinput map-to-output does the same,
> though in your case it's a bit trickier because you need to get the
> viewport and calculate the respective matrix. Still just moving numbers
> around, not technically hard.
>
> the difficult bit is getting the current viewport, where the xf86VidMode
> extension looks like the most likely candidate. possibly RandR, but I don't
> know the details on how to do it on either, sorry.
>
> Cheers,
>    Peter
>
>
> > On Tue, Apr 21, 2015 at 2:41 AM, Peter Hutterer <
> peter.hutterer@who-t.net>
> > wrote:
> >
> > > On Mon, Apr 20, 2015 at 05:21:44PM +0100, Daniel Harris wrote:
> > > > I am assuming that it is a limitation that a stylus cannot map it
> > > position
> > > > to a physical screen and a larger virtual screen at the same time.  I
> > > > currently have panning in the virtual screen but calibration is way
> off
> > > on
> > > > the physical screen.  I am assuming no mathematical wizardry with the
> > > > current setting can rectify this.
> > >
> > > should be able to, it just requires more effort once you start panning
> > > around. the mapping of the stylus to screen is done by a matrix that
> takes
> > > the whole desktop size into account. outputs as such don't matter here,
> > > e.g.
> > > mapping to the right of two monitors is done by mapping to the 50% of
> the
> > > width with a 50% offset.
> > >
> > > that means you can map to any part of the desktop, problem is it won't
> > > follow you around as you pan. you'd need some client to track that and
> > > update the coordinate transformation matrix as you go.
> > >
> > > Cheers,
> > >    Peter
> > >
> > >
> > > > On Sat, Apr 18, 2015 at 4:19 PM, Daniel Harris <
> > > mail.dharris@googlemail.com>
> > > > wrote:
> > > >
> > > > > Hello
> > > > >
> > > > > I have a surface pro 2 and would like to create a virtual screen of
> > > > > 3840x2160 and pan around using the 1920x1080 stylus enabled
> > > touchscreen on
> > > > > the surface pro 2.  I have Ubuntu installed and the screen setup
> but I
> > > > > cannot get the stylus to function correctly with that setup.  I
> have
> > > tried
> > > > > experimenting with the translation matrix but with no success.
> > > > >
> > > > > Is the above setup possible?
> > > > >
> > > > > I would welcome any advice as to how to achieve this setup
> > > > >
> > > > > Thanks in advance
> > > > >
> > > > > Dan
> > > > >
> > >
> > > > _______________________________________________
> > > > xorg@lists.x.org: X.Org support
> > > > Archives: http://lists.freedesktop.org/archives/xorg
> > > > Info: http://lists.x.org/mailman/listinfo/xorg
> > > > Your subscription address: %(user_address)s
> > >
> > >
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div>Thanks Peter<br><br></div>I appreciate your time and help \
and I will look into it<br><br></div>Dan<br><br><br></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 21, 2015 at 10:38 PM, \
Peter Hutterer <span dir="ltr">&lt;<a href="mailto:peter.hutterer@who-t.net" \
target="_blank">peter.hutterer@who-t.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On Tue, Apr 21, 2015 at 02:50:47PM +0100, \
Daniel Harris wrote:<br> &gt; Hello Peter<br>
&gt;<br>
&gt; I appreciate your reply.  I am not sure we are talking about the same thing<br>
&gt; so I have uploaded a video to youtube showing the problem i am experiencing<br>
&gt;<br>
&gt; If anyone is interested you can find it here <a \
href="http://youtu.be/n8N0NnB9u7g" \
target="_blank">http://youtu.be/n8N0NnB9u7g</a><br> <br>
</span>yeah, definitely the same thing. look at the distances of the pointer and<br>
the stylus relative to their origins - when the stylus is half-way down the<br>
device, the pointer is half-way down the whole screen. That&#39;s the basic<br>
problem - an absolute device is always mapped to the whole screen/desktop<br>
area.<br>
<span class=""><br>
&gt; are you saying the pointer position can be corrected with a client app or<br>
&gt; can it only be fixed in X.<br>
<br>
</span>yes, google for xinput coordinate transformation matrix and you&#39;ll find \
a<br> few tutorials, hints on how to do it. xinput map-to-output does the same,<br>
though in your case it&#39;s a bit trickier because you need to get the<br>
viewport and calculate the respective matrix. Still just moving numbers<br>
around, not technically hard.<br>
<br>
the difficult bit is getting the current viewport, where the xf86VidMode<br>
extension looks like the most likely candidate. possibly RandR, but I don&#39;t<br>
know the details on how to do it on either, sorry.<br>
<br>
Cheers,<br>
   Peter<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt; On Tue, Apr 21, 2015 at 2:41 AM, Peter Hutterer &lt;<a \
href="mailto:peter.hutterer@who-t.net">peter.hutterer@who-t.net</a>&gt;<br> &gt; \
wrote:<br> &gt;<br>
&gt; &gt; On Mon, Apr 20, 2015 at 05:21:44PM +0100, Daniel Harris wrote:<br>
&gt; &gt; &gt; I am assuming that it is a limitation that a stylus cannot map it<br>
&gt; &gt; position<br>
&gt; &gt; &gt; to a physical screen and a larger virtual screen at the same time.  \
I<br> &gt; &gt; &gt; currently have panning in the virtual screen but calibration is \
way off<br> &gt; &gt; on<br>
&gt; &gt; &gt; the physical screen.  I am assuming no mathematical wizardry with \
the<br> &gt; &gt; &gt; current setting can rectify this.<br>
&gt; &gt;<br>
&gt; &gt; should be able to, it just requires more effort once you start panning<br>
&gt; &gt; around. the mapping of the stylus to screen is done by a matrix that \
takes<br> &gt; &gt; the whole desktop size into account. outputs as such don&#39;t \
matter here,<br> &gt; &gt; e.g.<br>
&gt; &gt; mapping to the right of two monitors is done by mapping to the 50% of \
the<br> &gt; &gt; width with a 50% offset.<br>
&gt; &gt;<br>
&gt; &gt; that means you can map to any part of the desktop, problem is it \
won&#39;t<br> &gt; &gt; follow you around as you pan. you&#39;d need some client to \
track that and<br> &gt; &gt; update the coordinate transformation matrix as you \
go.<br> &gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt;    Peter<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt; On Sat, Apr 18, 2015 at 4:19 PM, Daniel Harris &lt;<br>
&gt; &gt; <a href="mailto:mail.dharris@googlemail.com">mail.dharris@googlemail.com</a>&gt;<br>
 &gt; &gt; &gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hello<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I have a surface pro 2 and would like to create a virtual screen \
of<br> &gt; &gt; &gt; &gt; 3840x2160 and pan around using the 1920x1080 stylus \
enabled<br> &gt; &gt; touchscreen on<br>
&gt; &gt; &gt; &gt; the surface pro 2.  I have Ubuntu installed and the screen setup \
but I<br> &gt; &gt; &gt; &gt; cannot get the stylus to function correctly with that \
setup.  I have<br> &gt; &gt; tried<br>
&gt; &gt; &gt; &gt; experimenting with the translation matrix but with no \
success.<br> &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Is the above setup possible?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I would welcome any advice as to how to achieve this setup<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Thanks in advance<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Dan<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; <a href="mailto:xorg@lists.x.org">xorg@lists.x.org</a>: X.Org \
support<br> &gt; &gt; &gt; Archives: <a \
href="http://lists.freedesktop.org/archives/xorg" \
target="_blank">http://lists.freedesktop.org/archives/xorg</a><br> &gt; &gt; &gt; \
Info: <a href="http://lists.x.org/mailman/listinfo/xorg" \
target="_blank">http://lists.x.org/mailman/listinfo/xorg</a><br> &gt; &gt; &gt; Your \
subscription address: %(user_address)s<br> &gt; &gt;<br>
&gt; &gt;<br>
</div></div></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic