[mutter/wip/texture-purge-on-nvidia: 40/71] x11/window-props: Do not convert WM_NAME
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/texture-purge-on-nvidia: 40/71] x11/window-props: Do not convert WM_NAME
- Date: Mon, 14 Jan 2019 21:02:23 +0000 (UTC)
commit e3d7b3828e71739e86b1d30838a7fd579d17aa98
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Oct 9 00:40:33 2018 +0200
x11/window-props: Do not convert WM_NAME
The WM_NAME property is of type TEXT_PROPERTY, which is supposed to be
returned as UTF-8. Commit 840378ae68 broke that assumption, resulting
in crashes with non-UTF8 locales; however the "fix" of converting from
LATIN1 to UTF8 is wrong as well, as the conversion will spit out garbage
when the input encoding isn't actually LATIN1.
Now that the original issue in text_property_to_utf8() has been fixed,
we can simply revert the relevant bits of commit d62491f46eba748e.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/227
src/x11/window-props.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
index 2f4dfeb31..7c6b25fdb 100644
--- a/src/x11/window-props.c
+++ b/src/x11/window-props.c
@@ -645,10 +645,7 @@ reload_wm_name (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID)
{
- g_autofree gchar *title = g_convert (value->v.str, -1,
- "UTF-8", "LATIN1",
- NULL, NULL, NULL);
- set_window_title (window, title);
+ set_window_title (window, value->v.str);
meta_verbose ("Using WM_NAME for new title of %s: \"%s\"\n",
window->desc, window->title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]