display-config-dbus: Consider interlaced flag for similar modes

Otherwise we could end up picking an interlaced mode when we want a
non-interlaced one or vice-versa since they might have equal
refresh rates.

https://bugzilla.gnome.org/show_bug.cgi?id=785949
This commit is contained in:
Rui Matos 2017-08-02 22:45:22 +02:00
parent 7c89e30a47
commit 353236b576

View file

@ -619,7 +619,8 @@ cc_display_monitor_dbus_get_closest_mode (CcDisplayMonitorDBus *self,
similar->height != mode->height)
continue;
if (similar->refresh_rate == mode->refresh_rate)
if (similar->refresh_rate == mode->refresh_rate &&
(similar->flags & MODE_INTERLACED) == (mode->flags & MODE_INTERLACED))
{
best = similar;
break;