[Xfce4-commits] [xfce/xfce4-settings] 02/02: display: Fix profile matching in xfsettingsd
noreply at xfce.org
noreply at xfce.org
Tue Aug 20 00:04:46 CEST 2019
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-settings.
commit 41dec5a0e2ac07676dffa1e3d5fc6f215a0c074d
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Aug 19 18:11:31 2019 +0200
display: Fix profile matching in xfsettingsd
Previously the code (erroneously) checked the CRTCs instead of the
Outputs, which meant that sometimes no EDID would be found (which is to
be expected) or the amount of CRTCs would differ from the amount of
Outputs, so the for loop would be messed up.
---
xfsettingsd/displays.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 289ff20..2efefa8 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -436,9 +436,9 @@ xfce_displays_helper_reload (XfceDisplaysHelper *helper)
static gchar **
-xfce_displays_helper_get_display_infos (gint noutput,
- Display *xdisplay,
- RROutput *outputs)
+xfce_displays_helper_get_display_infos (gint noutput,
+ Display *xdisplay,
+ GPtrArray *outputs)
{
gchar **display_infos;
gint m;
@@ -448,7 +448,10 @@ xfce_displays_helper_get_display_infos (gint noutput,
/* get all display edids, to only query randr once */
for (m = 0; m < noutput; ++m)
{
- edid_data = xfce_randr_read_edid_data (xdisplay, outputs[m]);
+ XfceRROutput *output;
+
+ output = g_ptr_array_index (outputs, m);
+ edid_data = xfce_randr_read_edid_data (xdisplay, output->id);
if (edid_data)
display_infos[m] = g_compute_checksum_for_data (G_CHECKSUM_SHA1 , edid_data, 128);
@@ -470,9 +473,9 @@ xfce_displays_helper_get_matching_profile (XfceDisplaysHelper *helper)
gchar *property;
gchar **display_infos;
- display_infos = xfce_displays_helper_get_display_infos (helper->resources->noutput,
+ display_infos = xfce_displays_helper_get_display_infos (helper->outputs->len,
helper->xdisplay,
- helper->resources->outputs);
+ helper->outputs);
if (display_infos)
{
profiles = display_settings_get_profiles (display_infos, helper->channel);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list