monitor-manager-xrandr: Changing "max bpc" changes output assignment

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2412>
This commit is contained in:
Daniel van Vugt 2022-06-10 16:34:01 +08:00 committed by Marge Bot
parent 99d84ae1cc
commit d39137c631

View File

@ -274,6 +274,7 @@ is_output_assignment_changed (MetaOutput *output,
for (i = 0; i < n_output_assignments; i++) for (i = 0; i < n_output_assignments; i++)
{ {
MetaOutputAssignment *output_assignment = output_assignments[i]; MetaOutputAssignment *output_assignment = output_assignments[i];
unsigned int max_bpc;
if (output_assignment->output != output) if (output_assignment->output != output)
continue; continue;
@ -289,6 +290,17 @@ is_output_assignment_changed (MetaOutput *output,
output_assignment->is_underscanning) output_assignment->is_underscanning)
return TRUE; return TRUE;
if (meta_output_get_max_bpc (output, &max_bpc))
{
if (!output_assignment->has_max_bpc ||
max_bpc != output_assignment->max_bpc)
return TRUE;
}
else if (output_assignment->has_max_bpc)
{
return TRUE;
}
output_is_found = TRUE; output_is_found = TRUE;
} }