Skip to content

kcm/output_model: basic mode matching in mirroring

Yifan Zhu requested to merge work/fanzhuyifan/mirror into master

Provide basic support for adapting display modes for output replication.

Suppose the user wants screen A to replicate screen B. We only change the configuration of screen A:

  1. find the modes with the closest aspect ratio to B
  2. Within these, find modes with closest size, preferring larger ones
  3. Within these, find the highest refresh rate

Known limitations: on X11, if all modes of screen A have lower resolution than the current resolution of screen B, screen A will display a cropped region of screen B. This limitation also existed before the change.


I decided not to adapt the configuration of screen B, because technically the user can also set another screen C to replicate screen B, which would make things really complicated..

Edited by Yifan Zhu

Merge request reports