[Weston] More discussion about weston output relative motion algorithm

Wang, Quanxian quanxian.wang at intel.com
Wed May 7 00:03:32 PDT 2014



> -----Original Message-----
> From: Pekka Paalanen [mailto:ppaalanen at gmail.com]
> Sent: Wednesday, May 7, 2014 2:17 PM
> To: Wang, Quanxian
> Cc: Hardening (rdp.effort at gmail.com); Bryce W. Harrington
> (b.harrington at samsung.com); wayland-devel at lists.freedesktop.org; Jason
> Ekstrand (jason at jlekstrand.net); Kang, Jeong Seok; Fu, Michael
> Subject: Re: [Weston] More discussion about weston output relative motion
> algorithm
> 
> On Wed, 7 May 2014 03:26:56 +0000
> "Wang, Quanxian" <quanxian.wang at intel.com> wrote:
> 
> > Thanks Pq's comment. Before you continue my comment, I mentioned one
> point.
> > This is output movement algorithm and it is completely different with pre-
> configuration of output in weston.ini.
> > For output, no alive, no movement.
> > If you want to keep pre-configuration in weston.ini when output change,
> just keep it in some place and follow it when pre-defined output is plugged
> or unplugged. But anyway, it is a static configuration.  It is conflict with
> dynamic output movement.
> >
> 
> Of course it is, but users expect both to work at the same time, not have an
> option to choose between dynamic and static configuration. They want to
> configure what the dynamic code will do on hotplug, hence these two cases
> are inseparable.
> 
> The weston-randr protocol could be seen as a way to modify the static
> configuration in-memory and then trigger a re-layout.
> 
> Btw. there is no reason to avoid negative global coordinates. If you have
> output A at 0,0 and add output B to the left of it, it is perfectly valid to put B
> at -widthB,0. You *can* add to the left or above without moving all the
> existing outputs. Also nothing says that you have to have an output with
> origin at 0,0. (There may be bugs, but that is all.)
[Wang, Quanxian] no negative coordinate happens. Top left most is the (0,0), it is the primary output. 
When you move output left of or above primary output(0,0), other outputs will be moved consistently based on the change. Once you primary output is changed, for example in this case, primary output will be changed to another output.  All others outputs' coordinate will be calculated again. But the relative position between outputs will not be changed. 
Top left most output is the root of tree. All other outputs must be descendants of it.(including clone link, hlink, vlink).  Output movement algorithm have implemented that. Negative coordinate is invalid.
> 
> If you haven't, and I certainly have not, you really should study how existing
> monitor layout algorithms work. Do not set out to replicate them as is, but
> find out how they solve the problems and whether those solutions would be
> applicable here.
[Wang, Quanxian] You are right. Refer to others could get more valuable idea and be helpful to make algorithm stronger. My goal is to provide a reasonable algorithm for weston output movement. 
> 
> For getting this work forward and upstream, I think it is much less
> controversial to first expand weston.ini to allow setting other than just
> horizontal line of outputs. That would be interesting to a lot more people
> than the dynamic configuration protocol, and you would still need to deal
> with hotplug.
> 
> Btw. I don't understand the comment "no alive, no movement".
[Wang, Quanxian] if output is not active, no movement should happens on this output. Any movement on such kind of output will be invalid.
The inactive status include two status.
 a)unplugged-hardware disable  
b) plugged but disabled - software disable
> 
> 
> Thanks,
> pq


More information about the wayland-devel mailing list