monitor: Move check to limit fractional scales to certain monitor sizes
We'll reuse meta_monitor_get_closest_scale_factor_for_resolution() for the conversion of monitor configs, and during those conversions, we probably don't want to impose the same limits to fractional scales that we usually impose. This means that we can even convert physical layout configs where the user manually changed to a value higher than what our fractional scale calculations would allow. Move this check into the calling function so that it's not imposed by meta_monitor_get_closest_scale_factor_for_resolution() directly. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3596>
This commit is contained in:
parent
078d95cc15
commit
96791f111a
1 changed files with 3 additions and 3 deletions
|
@ -2009,9 +2009,6 @@ meta_get_closest_monitor_scale_factor_for_resolution (float width,
|
|||
|
||||
best_scale = 0;
|
||||
|
||||
if (!is_scale_valid_for_size (width, height, scale))
|
||||
return best_scale;
|
||||
|
||||
if (fmodf (width, scale) == 0.0 && fmodf (height, scale) == 0.0)
|
||||
return scale;
|
||||
|
||||
|
@ -2095,6 +2092,9 @@ meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
|
|||
float scale;
|
||||
float scale_value = i + j * SCALE_FACTORS_STEPS;
|
||||
|
||||
if (!is_scale_valid_for_size (width, height, scale_value))
|
||||
continue;
|
||||
|
||||
scale = meta_get_closest_monitor_scale_factor_for_resolution (width,
|
||||
height,
|
||||
scale_value,
|
||||
|
|
Loading…
Reference in a new issue