mate-desktop/0001-KYOS-B-Fix-mate-settings-daemon-crash.patch
longcheng e5c33f283d Add some patches
Signed-off-by: longcheng <longcheng@kylinsec.com.cn>
2022-07-19 17:55:16 +08:00

51 lines
1.3 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From e0ed56cc90f28e0988363ca9bd109bbd3c234fd5 Mon Sep 17 00:00:00 2001
From: songchuanfei <songchuanfei@kylinos.com.cn>
Date: Thu, 23 Apr 2020 11:40:48 +0800
Subject: [PATCH] KYOS-B: Fix mate-settings-daemon crash
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复mate-settings-daemon启动时崩溃的问题具体原因不明
Signed-off-by: songchuanfei <songchuanfei@kylinos.com.cn>
---
libmate-desktop/mate-rr.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/libmate-desktop/mate-rr.c b/libmate-desktop/mate-rr.c
index a9bdf79..ed2607e 100644
--- a/libmate-desktop/mate-rr.c
+++ b/libmate-desktop/mate-rr.c
@@ -1205,10 +1205,26 @@ read_edid_data (MateRROutput *output, int *len)
static gboolean check_hotplug_mode_update(MateRROutput *output)
{
+#ifdef HAVE_RANDR
Atom atom;
+ int len;
+ guint8 *result;
atom = XInternAtom(DISPLAY(output), "hotplug_mode_update", FALSE);
- return (XRRQueryOutputProperty(DISPLAY(output), output->id, atom) != NULL);
+ if (atom == None)
+ return FALSE;
+ result = get_property (DISPLAY (output),
+ output->id, atom, &len);
+
+ if (result) {
+ g_free(result);
+ return TRUE;
+ } else
+ return FALSE;
+
+#else
+ return FALSE;
+#endif
}
gboolean mate_rr_output_has_hotplug_mode_update(MateRROutput *output)
--
1.8.3.1