kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0001-x11-window-props-Do-not-convert-WM_NAME.patch

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