Skip to content
  • Marco Trevisan's avatar
    x11: Add logical layout mode with randr and UI scaling · baa2326b
    Marco Trevisan authored
    Implement a new layout mode where we use both the global UI scaling and logical
    sized monitors with inverse randr scaling.
    
    It allows to support fractional scaling in the X11 backend with some good
    quality image results also in multi-monitor with multi-DPI.
    
    It works by scaling up the UI to the maximum ceiled scaling value across the
    monitors, and then scaling down (via randr transformations) the monitors so
    that:
      monitor_scaling = ui_scale * monitor_randr_scaling
    
    In order to do this the layout GLOBAL_UI_LOGICAL is added which is logical mode
    where monitor positioning is computed dividing the monitor scale by the maximum
    scaling across the displays.
    
    This is known to work at best with modesetting drivers when glamor is used.
    baa2326b