[Weston] More discussion about weston output relative motion algorithm

Pekka Paalanen ppaalanen at gmail.com
Wed May 7 00:41:00 PDT 2014


On Wed, 7 May 2014 07:03:32 +0000
"Wang, Quanxian" <quanxian.wang at intel.com> wrote:

> 
> 
> > -----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.

You misunderstood. I mean that sometimes it is *good* to use negative
coordinates, exactly to avoid moving the world, and that is *perfectly
ok*.

Moving the world (all existing outputs) is usually not what a user might
expect when adding a new output.

The top-left most output does not need to be at 0,0.

> 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.

I'm not talking about your specific algorithm anymore. I am talking in
general.

Existing outputs are usually expected to stay put, when adding outputs
to the extremes. Literally that means that the position of the existing
outputs must not change, but only the position of the new output is
computed appropriately, even if it results in negative coordinates.

If I have one output active, and I add another output to the left of
it, I certainly do not expect all windows to jump from the existing
output to the new output. IOW, the position of the existing output must
not change, and the new output will get a negative position.

This is about the absolute global coordinates, not the relative
positioning between outputs.

> > 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

What does "movement happening on an output" mean? What could be moving
on that inactive output? Are you perhaps instead trying to say, that
using an inactive output as the reference point for placing another
output is not allowed?


Thanks,
pq


More information about the wayland-devel mailing list