[PATCH RFC] Allow configuration of output positions

Pekka Paalanen ppaalanen at gmail.com
Tue Jun 25 03:05:58 PDT 2013


On Thu, 13 Jun 2013 21:59:55 +0200
Florian Scandella <flo at chilicode.com> wrote:

> 
> Hi,
> 
> Can someone pls have a look at this patch?
> 
> I implemented configuration options for relativ output positioning in
> weston.ini. Currently the implementation is private to the drm
> compositor, but i think this can be generalized for all output
> drivers. ATM it can only be configured in weston.ini, a dynamic way
> like xrandr would be nice (now idea how to).
> Next i want to introduce a concept of primary output, to center the
> mouse on the right monitor on start, draw the launcher only there and
> other stuff.
> 
> I'm new to wayland/weston, so i'm not sure if this is even the right
> approach ...
> 
> only tested with 2 monitors, sadly i don't have more :)

Hi,

yeah, the basic approach seems fine to me. You can get an arbitrary
amount of outputs for testing, if you add this functionality to the x11
backend. It would also be useful to test and guard against crazy(?)
configurations, like multiple position keys in one output section, or
impossibilities like A:left-of-B combined with B:left-of-A or longer
loop. It would be cool to add that to the test suite.

I also see you are trying to cope with dynamic output changes, that's
good, even though Weston on other parts (especially shell) does not
handle it.

There are some coding style issues, like operator spacing, and line
lengths.

I didn't review the algorithm, though one thing coming to my mind is,
if you have configured outputs A-B-C in that layout, and only A and C
are present, are they positioned properly?

If you want comments on the code, you should send it inline. We cannot
easily quote an attachment in email.

Don't worry about the xrandr-replacement for now, it is somewhat
orthogonal to this.

Primary output is probably more of a shell concept than a Weston core
concept, but I guess you could propose something. I would think that
the core would use it only for the initial position of a pointer, when
a wl_pointer first appears. The shell would do its own stuff if it
wishes.


Thanks,
pq


More information about the wayland-devel mailing list