|
|
f73620 |
From ad1a395707f7c37b26ce446f0fd73ac7fbb9d0fd Mon Sep 17 00:00:00 2001
|
|
|
f73620 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
f73620 |
Date: Tue, 9 Oct 2018 00:40:33 +0200
|
|
|
f73620 |
Subject: [PATCH 1/2] x11/window-props: Do not convert WM_NAME
|
|
|
f73620 |
|
|
|
f73620 |
The WM_NAME property is of type TEXT_PROPERTY, which is supposed to be
|
|
|
f73620 |
returned as UTF-8. Commit 840378ae68 broke that assumption, resulting
|
|
|
f73620 |
in crashes with non-UTF8 locales; however the "fix" of converting from
|
|
|
f73620 |
LATIN1 to UTF8 is wrong as well, as the conversion will spit out garbage
|
|
|
f73620 |
when the input encoding isn't actually LATIN1.
|
|
|
f73620 |
|
|
|
f73620 |
Now that the original issue in text_property_to_utf8() has been fixed,
|
|
|
f73620 |
we can simply revert the relevant bits of commit d62491f46eba748e.
|
|
|
f73620 |
|
|
|
f73620 |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/227
|
|
|
f73620 |
---
|
|
|
f73620 |
src/x11/window-props.c | 5 +----
|
|
|
f73620 |
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
f73620 |
|
|
|
f73620 |
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
|
|
|
f73620 |
index 2f4dfeb31..7c6b25fdb 100644
|
|
|
f73620 |
--- a/src/x11/window-props.c
|
|
|
f73620 |
+++ b/src/x11/window-props.c
|
|
|
f73620 |
@@ -645,10 +645,7 @@ reload_wm_name (MetaWindow *window,
|
|
|
f73620 |
|
|
|
f73620 |
if (value->type != META_PROP_VALUE_INVALID)
|
|
|
f73620 |
{
|
|
|
f73620 |
- g_autofree gchar *title = g_convert (value->v.str, -1,
|
|
|
f73620 |
- "UTF-8", "LATIN1",
|
|
|
f73620 |
- NULL, NULL, NULL);
|
|
|
f73620 |
- set_window_title (window, title);
|
|
|
f73620 |
+ set_window_title (window, value->v.str);
|
|
|
f73620 |
|
|
|
f73620 |
meta_verbose ("Using WM_NAME for new title of %s: \"%s\"\n",
|
|
|
f73620 |
window->desc, window->title);
|
|
|
f73620 |
--
|
|
|
f73620 |
2.21.0
|
|
|
f73620 |
|