[gnome-control-center/gnome-41] display-config: Do not invert order when constructing modes
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-41] display-config: Do not invert order when constructing modes
- Date: Wed, 5 Jan 2022 22:33:27 +0000 (UTC)
commit 293e191e399123c91ef5d7b5c796ea0f42b8bd91
Author: Robert Mader <robert mader posteo de>
Date: Sun Jan 2 20:55:15 2022 +0100
display-config: Do not invert order when constructing modes
Mutter sends modes in descending order of preference. By reverting
the order via `g_list_prepend`, we get unintended side effects
such as choosing the least preferred refresh rate by default (if
the selected mode is not marked as preferred).
Instead of adding complex logic in several places, make sure that
the assumption of descending preference is kept by simply not
inverting the order.
Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1562
(cherry picked from commit 6a4652bd35e23a4ae4ec3078be380ed09858e0ee)
panels/display/cc-display-config-dbus.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/panels/display/cc-display-config-dbus.c b/panels/display/cc-display-config-dbus.c
index ae9eb01b1..bc20b6982 100644
--- a/panels/display/cc-display-config-dbus.c
+++ b/panels/display/cc-display-config-dbus.c
@@ -795,6 +795,8 @@ construct_modes (CcDisplayMonitorDBus *self,
if (mode->flags & MODE_CURRENT)
self->current_mode = CC_DISPLAY_MODE (mode);
}
+
+ self->modes = g_list_reverse (self->modes);
}
static CcDisplayMonitorDBus *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]