output: add phys_scale to adjust EDID-reported size

Some monitors report an invalid size in their EDID.  While sway ignores these
sizes (see phys_size_is_aspect_ratio), some other applications do not.  Instead
of requiring a change to the monitor, allow specifying a scaling factor in the
configuration to bring the physical dimensions in line with reality.
This commit is contained in:
Daniel De Graaf 2020-11-09 21:00:59 -05:00
parent 5ae4f65045
commit 388fce5a1f
6 changed files with 37 additions and 0 deletions

View file

@ -282,6 +282,7 @@ sway_cmd output_cmd_dpms;
sway_cmd output_cmd_enable;
sway_cmd output_cmd_max_render_time;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_phys_scale;
sway_cmd output_cmd_position;
sway_cmd output_cmd_scale;
sway_cmd output_cmd_scale_filter;

View file

@ -259,6 +259,7 @@ struct output_config {
int custom_mode;
int x, y;
float scale;
float phys_scale;
enum scale_filter_mode scale_filter;
int32_t transform;
enum wl_output_subpixel subpixel;