summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2018-10-12 15:00:02 +0200
committerJonas Ådahl <jadahl@gmail.com>2018-10-12 15:00:02 +0200
commite24947a460f75caaf014bd49990f0867a66615b5 (patch)
treed68f386aacbdd95b3399bc3f38d2391c53b1177f
parentd387aa428a18393938c6d6f7baef2c1dd726436e (diff)
downloadmutter-e24947a460f75caaf014bd49990f0867a66615b5.tar.gz
Revert "Characters of window title bar garbled"
For some reason Gitlab pushed the wrong commits when merging https://gitlab.gnome.org/GNOME/mutter/merge_requests/227. Correct that. This reverts commit d387aa428a18393938c6d6f7baef2c1dd726436e.
-rw-r--r--src/x11/window-props.c5
-rw-r--r--src/x11/xprops.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
index d165c2cd2..d06a89a21 100644
--- a/src/x11/window-props.c
+++ b/src/x11/window-props.c
@@ -651,7 +651,10 @@ reload_wm_name (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID)
{
- set_window_title (window, value->v.str);
+ g_autofree gchar *title = g_convert (value->v.str, -1,
+ "UTF-8", "LATIN1",
+ NULL, NULL, NULL);
+ set_window_title (window, title);
meta_verbose ("Using WM_NAME for new title of %s: \"%s\"\n",
window->desc, window->title);
diff --git a/src/x11/xprops.c b/src/x11/xprops.c
index 2bef29985..ae05afe14 100644
--- a/src/x11/xprops.c
+++ b/src/x11/xprops.c
@@ -639,7 +639,6 @@ text_property_to_utf8 (Display *xdisplay,
{
char *ret = NULL;
char **local_list = NULL;
- const char *charset = NULL;
int count = 0;
int res;
@@ -650,10 +649,7 @@ text_property_to_utf8 (Display *xdisplay,
if (count == 0)
goto out;
- if (g_get_charset (&charset))
- ret = g_strdup (local_list[0]);
- else
- ret = g_convert (local_list[0], -1, "UTF-8", charset, NULL, NULL, NULL);
+ ret = g_strdup (local_list[0]);
out:
XFreeStringList (local_list);