On Mon, 13 Apr 2015 10:14:32 -0700
Thiago Macieira <[email protected]> wrote:

> On Monday 13 April 2015 12:14:02 Simon McVittie wrote:
> > (tl;dr: PREFERRED_DISPLAY="wayland mir x11" would be
> > better than PREFERRED_DISPLAY="WAYLAND_DISPLAY
> > MIR_DISPLAY DISPLAY".)
> 
> If we're going to do that, why not put the full
> identifiers in the variable? Then we wouldn't have to
> look up another environment variable for the details.

Are you asking why we should have PREFERRED_DISPLAY=x11
rather than PREFERRED_DISPLAY=DISPLAY or are you asking
why we should have PREFERRED_DISPLAY=x11 rather than
PREFERRED_DISPLAY=x11=:0?


If the former:

Assume have program that uses an abstraction layer.
Then we can, for example, do something like

  for proto in os.environ['PREFERRED_DISPLAY'].split():
    if not proto == '':
      if my_abstraction_layer.select_protocol(proto):
        break
  else:
    my_abstraction_layer.select_protocol('dri'):


If the latter:

If we do not to it this way, it makes the example above,
and similar things, more complex.
I think that WAYLAND_DISPLAY &c should _not_ be removed.
So it would be redundant, and doing a second look up is
cheap. And a program that only supports Wayland would
have to parse PREFERRED_DISPLAY.

Attachment: pgpPHiNtJ1MeD.pgp
Description: OpenPGP digital signature

_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to