mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
monitor: Ensure the preferred mode is always included
If there are two display modes present with the same flags, and one of them is the preferred mode, it could have been excluded from the resulting list of display modes. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2858 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3061>
This commit is contained in:
parent
bea2fdc12b
commit
97f0e2e691
@ -781,7 +781,10 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
|
||||
* otherwise take the first one in the list. This guarantees that the
|
||||
* preferred mode is always added.
|
||||
*/
|
||||
replace = crtc_mode_info->flags == preferred_mode_flags;
|
||||
replace = (crtc_mode_info->flags == preferred_mode_flags &&
|
||||
(!monitor_priv->preferred_mode ||
|
||||
g_strcmp0 (meta_monitor_mode_get_id (monitor_priv->preferred_mode),
|
||||
mode->id) != 0));
|
||||
|
||||
if (!meta_monitor_add_mode (monitor, mode, replace))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user