Skip to content

protocol: add compositor defined index to wl_output

Maarten de Vries requested to merge de-vri-es/wayland:wl-output-index into main

This PR adds an optional index to wl_output.

The main motivation is use in a tiling compositor to have a reliable way to refer to "the first output", "the second output", etc.

Right now, the only identifier you have is the name, but this name is static for the lifetime of the output and it is often determined by compositors based on the port an output is plugged in to.

This makes it very difficult to: a) Cope with laptops where screens are plugged in to different ports all the time (some screens have (micro-)HDMI, other have display port or USB-C, etc). b) Write your compositor configuration to be machine independent.

Many compositors already assign indices to outputs, but they can not report them to clients in a standard way. This information is still useful to clients though. For example, I want my top-bar on the second screen to be a different color than the one on the first screen. Others may want them to have different widgets or different positioning.

Merge request reports

Loading