Skip to content

Be more descriptive about user defined vs default monitors in randr and allow...

Be more descriptive about user defined vs default monitors in randr and allow more than one virtual monitor per physical output

Background

I have discussed in the mailing list if we could allow more than one monitor per output. I got the following response from @keithp , the original author of that part of the spec:

That's actually required in the RandR spec:

For each output in 'info.outputs, each one is removed from all pre-existing Monitors. If removing the output causes the list of outputs for that Monitor to become empty, then that Monitor will be deleted as if RRDeleteMonitor were called.

The notion of splitting one physical output into multiple virtual monitors was not considered when this extension was defined, which is why it doesn't work. I don't see any particular reason for not supporting your use case.

However, there are subtleties here. We want to remove any automatically created 'Monitor' objects when mapping user-specified monitors to them, and we want to re-generate automatically generated 'Monitors' when all virtual monitors associated with an output are removed.

I think what we want is:

  • If no user-specified Monitors map to a particular Output, then automatically create a Monitor for that Output
  • If any user-specified Monitors map to a particular Output, then remove the automatically generated Monitor for that Output.

In the current spec, there's no real separation between user-specified and automatically-generated Monitors, I think that would be necessary to make this work?

I have created a merge request that results in the desired behavior at xorg/xserver!981 (merged). This PR adds the required change to the spec as well. In addition, I have also added the behavior of the default vs. user defined monitors to the spec - this reflects the actual behavior of the xorg implementation.

@keithp I'd be happy if you find the time to look over the change and tell if you can approve this or if further changes or discussion are required.

Merge request reports

Loading