[RFC PATCH wayland-protocols] Introduce logical output protocol for Xwayland

Olivier Fourdan ofourdan at redhat.com
Fri Jun 30 08:38:07 UTC 2017


Hi Jonas,

> On Thu, Jun 29, 2017 at 04:44:34PM +0200, Olivier Fourdan wrote:
> > This introduces a new protocol for the compositor to describe outputs
> > size in a logical way for Xwayland.
> > 
> > This is needed for X11 applications that would want to configure an X11
> > window based on the size of the output, without knowing the output scale
> > factor applied by the compositor to the corresponding Xwayland surface.
> 
> So, yes, Xwayland needs this, and I see no way around it. On IRC you
> raised the question whether this should really be part of wl_output is a
> good question indeed. Would it ever be useful for a regular Wayland
> client to know about this?
> 
> For fullscreening, we already communicate the expected size (in the
> surface coordinate space) via the xdg_toplevel.configure event. Knowing
> how much space is available on a work space (i.e. possibly useful for
> avoiding too big windows) wouldn't be possible as this wouldn't include
> panels, launchers etc, nor would the client know on what output it'll be
> started (yet at least).
> 
> Adding it to wl_output might be fine anyway, as we could refer to it
> when talking about how clients should not rely on calculating its own
> "output size" by looking at wl_output::mode, wl_output::transform and
> wl_output::scale, but we could just as well clarify that they simply
> shouldn't.

Yes, on further consideration and as we discussed earlier today on irc, this might be of interest to some other clients as well, so adding it to the existing wl_output interface makes sense imho, rather than adding an Xwayland specific interface...

> 
> Anyway, some comments about this proposal below:
> 
> [...]
> 
> As mentioned, I'd say not talking about "scaled" is better, but rather
> talk about coordinate spaces, and how a surface size is represented in
> it. wl_output talks about the "compositor space" which is indeed what we
> are communicating here, but having an example about how the size of a
> surface normally will have corresponding size in the compositor space
> would be good.
> 
> For example, a surface with the same size as the size advertised here
> will normally have the same size as the monitor when displayed could be
> such an example.

I'll take this as an example in the wl_output addition indeed.

Cheers
Olivier


More information about the wayland-devel mailing list